[python]First use of Napalm

I have a few Cisco routers which are on IOS, I have never used NAPALM before, I use netmiko most often for cisco devices, Napalm itself is based on netmiko, I napalm has a get_facts method that gather the information of cisco ios router, this is very convenient as compared with netmiko, netmiko is more … Continue reading [python]First use of Napalm

Advertisement

[python]Cisco FMC REST API example – GET Server version and add device to Cisco FMC

Introduction The version used for this lab is Cisco FMC 6.4.0, and Cisco FTD used is 6.3.0. To access the Cisco FMC REST API, you need to ensure it is enabled. You can test it by going to https:///api/api-explorer if you can see the swagger like documentation then the REST API is enabled, you can … Continue reading [python]Cisco FMC REST API example – GET Server version and add device to Cisco FMC

[python]Understanding how to capture the result you need with Nornir

Introduction The documentation has illustrated how to display the output to the console screen, however it did not explicitly show how to capture the data you need. It does document about what is AggregatedResult object and Result object, but still using examples will be easier to understand and also to encourage more people to use … Continue reading [python]Understanding how to capture the result you need with Nornir

[python]Nornir framework usage example 1 – show ip int brief

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

[python]Grow commands from a template with jinja2

Problem I made a template to push object network configuration to Cisco ASA, this is how the template looks like: conf_attr is the keyword to store the payload I sent to Cisco ASA via Nornir/netmiko, the problem with this template is only one command is sent per session. In order to commands to be sent … Continue reading [python]Grow commands from a template with jinja2

[python]show run object network

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

[python]Convert TextFSM nested list data into dictionary

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

[python]Napalm-asa only supports Cisco ASA with REST API

I am using the napalm-asa asa driver, however this driver can only be used if the Cisco ASA installs the REST API package, hence for cisco ASA that does not have REST API, Napalm cannot be used. Instead use netmiko, netmiko is using ssh and has methods to let you send commands. It is not … Continue reading [python]Napalm-asa only supports Cisco ASA with REST API