I was testing on another command show run object network, and ttp did not match the word "description" and hence the part about "description" was omitted. This is not a problem as netmiko already has a ready made textFSM template that matches show run object network. Example of ttp with show run object network This … Continue reading [python]TextFSM and TTP
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.
Introduction Nornir is a framework for network automation, it gels popular automation tools such as napalm, netmiko, paramiko and Ansible. However I could not find good examples on how to parse the result if I use show access-list with netmiko_send_command during task.run. There is a built in print_result() function which shows the status and output … Continue reading [python]How to capture results with nornir
Introduction On previous few posts, the ACL was push to the cisco asa with Nornir, but there was limitation that is only one source ip, one destination ip and one service are allowed, if there is more than one in any of these then only one rule is pushed. But there will be a number … Continue reading [python]Improve on ACL template.
Introduction Nornir is a framework for network automation, it gels netmiko, paramiko, ansible, yaml, ansible, napalm, netconf together, this is a must have package for doing network automation and it is not too difficult to learn. There will be time when specific configuration is for specific device in the inventory, in order to push to … Continue reading [python]Filter inventory – Nornir
Introduction On previous post testing was done to push ACL to Cisco ASA with static information, however in production preparing static information directly to the run method of Nornir is not practical, if the information is passed as a dictionary through API gateway the payload will have to be passed to the add_acl function. So … Continue reading [python]Push ACL to Cisco ASA with Nornir. Passing in dictionary.
Introduction Nornir is a framework for network automation, the framework is written in Python and gels Paramiko, Netmiko, Napalm, Jinja2 and Ansible. The use of framework makes the code more consistent and easier to adapt. Secret management Hashicorp vault is required for storing the secret in the code. The extraction of secrets from the vault … Continue reading [python]Using Nornir framework to push ACL to Cisco ASA
Introduction There are many examples that hardcoded username and password into the yaml file, and use InitNornir, best practice and example should not show hardcoded credentials, always use a vault or a database that centrally stores username and password securely, one particular credential storage I am using is Hashicorp vault. In my opinion, best practice … Continue reading [python]Dynamic hosts data, using Nornir framework