Introduction Before using Nornir, I was using netmiko, netmiko is a steady module which makes configuring, getting information from cisco based devices easily. Of course netmiko is not limited to just Cisco, it is a multi-vendor module. Napalm is another network module which does the same thing as netmiko, however when dealing with Cisco ios … Continue reading [python]Nornir framework usage example 1 – show ip int brief
The Cisco ASAv has a command show interface summary, this command output has a lot of information, these are the interesting information I need from this command: Interface id including the sub interface if available nameif, which is the name interface which must be configured administrative status protocol status vlan id if available ip address … Continue reading [python]TextFSM to match show interface summary
I have been experimenting a few combination with textfsm, the problematic one is show run object service may show description and some may not show description this is because description is an optional configuration item in Cisco ASA. This makes matching description kind of hard. The current working textfsm only matches compulsory items such as … Continue reading [python]Matching sh run object service with textfsm
Cisco ASA's show run object network will show the subnet, host and range objects, netmiko has a textfsm template to match the result in dictionary, however there is no template to match show run object service hence for the service part you will need to write your own textfsm template. On this example I will … Continue reading [python]show run object network
Introduction Reference: http://gratuitousarp.info/a-quick-example-of-using-textfsm-to-parse-data-from-cisco-show-commands/ The reference article alluded a method known as value_map, I immediately knew it is possible to change to dictionary easily when I saw the output of value_map. This is how the output of value_map looks like, and this explains how the variable maps to the regex, if you are using re module … Continue reading [python]Convert TextFSM nested list data into dictionary
Introduction Netmiko has support of textfsm, however it does not have every template to help the matching, to learn how to use textfsm is useful in this situation which you can create your own template without overly rely on module's limited template. TextFSM is created by google, it provides easier and more structured way of … Continue reading [python]Use TextFSM to easily get objects you need from unstructured data.