Task 2: Writing Initial Scripts

In this task, you will learn how to collect device information using pyATS scripting. You will connect to the pyATS shell, iterate over devices in the testbed, execute the “show inventory” command, and save the output to a file. This practical exercise will help you understand key Python concepts like loops, exceptions, and file operations.

Additionally, you will dive into the structure of pyATS test scripts. You will learn about the common_setup section, establish connections to devices, introduce logging capabilities, and add a new test case to verify interface errors. By the end of this task, you will have a solid understanding of test script components, including setup, test, and logging steps, and be able to run and analyze test reports.

Tip

The estimated time to complete this task is: 30 Minutes