Creating a pyATS testbed file
When connecting to devices, we always need a way of specifying the connection details. In previous chapters, we have provided these details either in the script or asked the user to provide the connection details upon execution. With pyATS, there is a different concept. pyATS relies on a text file, written in YAML Ain't Markup Language (YAML) and commonly referred to as a testbed, that specifies the different attributes such as device type, hostname, and username/password for our device.
In this recipe, you'll see how to create such a testbed file and how to use the interactive shell that comes with every installation of pyATS to test the connectivity to the devices in your testbed.
Getting ready
Open your code editor and start by creating a file called testbed.yaml
. Next, navigate in your terminal to the same directory in which you just created the testbed.yaml
file.