-
Book Overview & Buying
-
Table Of Contents
Python Network Programming Techniques
By :
In the previous recipe (Retrieving command outputs as structured Python data using netmiko and Genie), we saw how to retrieve the output of a command as structured data in Python. In this recipe, we will build upon this functionality to get a profile of all our interfaces. This will show you how to use the parsed data to quickly print out and identify the relevant information.
For this example, we'll be using the show interfaces command again and, for each interface, we will retrieve and print out the following:
Open your code editor and start by creating a file called get_facts.py. Next, navigate your terminal to the same directory that you just created the get_facts.py file in.
When installing netmiko via pip, it does not come preinstalled...