Demos, examples, content for the talk "Introduction to Writing Network Tests with pyATS"
- pyATS Homepage
- pyATS Getting Started Guide
- pyATS on GitHub
- pyATS on PyPi
- pyATS on Docker Hub
- pyATS Supported Devices
- pyATS Library Supported Parsers
- pyATS Library Supported Feature Models
- pyATS Library Supported API Functions
- pyATS Library Supported Triggers
- pyATS Library Supported Verifications
- Genie Harness Getting Started Guide
If you'd like to run the demo tests in this repository, first step is to reserve the network that goes along with the testbed.yaml
file.
DevNet Sandbox: Cisco Network Services Orchestrator
This sandbox provides a sample network configured with interfaces, routing, etc that can be used for a variety of tests and labs.
It is recommended to review the pyATS Getting Started Guide, but you can get started quickly with this.
pip install pyats[full]
Note: you'll need to be on Linux or macOS and be in a virtualenv of Python 3.5+
The folder network_test_project
will check that all devices in the testbed are reachable, and that interfaces aren't showing any errors.
The testbed.yaml
file is setup to look in the environment variables for the user/password for devices.
testbed:
name: Multi Platform Network
credentials:
default:
username: '%ENV{PYATS_USERNAME}'
password: '%ENV{PYATS_PASSWORD}'
enable:
password: '%ENV{PYATS_PASSWORD}'
line:
password: '%ENV{PYATS_PASSWORD}'
linux:
password: '%ENV{PYATS_PASSWORD}'
As the Sandbox is a sample network, the values for these are included in the pyats_env
file in the repository. "source" it to set these variables.
source pyats_env
Now you can run the test with
pyats run job network_test_project/network_test_job.py --testbed testbed.yaml
Note: you'll need to be VPN connected to the DevNet Sandbox to run the test
To checkout the results and logs from the test, use the pyats logs view
function to open a browser view.