Example code for various NetDevOps demos
We'll explain all the details as the demo goes on, but let's get setup to run these demos.
-
You'll need a workstation with Python 3.6 or 3.7 installed and functional along with Git.
-
Clone down the code from GitHub and change into the directory for this demo.
git clone https://github.com/EricThiel/netdevops_samples cd netdevops_samples
-
Create a Python 3 virtual environment, and install the requirements (pyATS and Genie)
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt
-
Create the "normal" profile for the network. This command can take up to 4 minutes to complete. You'll get a progress bar showing status as it runs.
genie learn config routing --testbed-file lab1.yaml --output tests/normal
- What this command is doing is giving Genie a baseline from which you can look for differences when something goes wrong.
-
After a failure, re-run to capture new state:
genie learn config routing --testbed-file lab1.yaml --output tests/out1
-
Then, run a genie diff to find what has changed:
genie diff tests/normal tests/out1 --output diff1
-
You may review the results within the diff1 folder in text files per parser and device.