This repository contains my python script examples, which are explained in more detail at the Coding Networker Blog.
The following examples are included in this repository:
- Parse CLI outputs with TextFSM - This post describes how to parse CLI outputs using TextFSM. Within the an example, I work with multiple "show inventory" commands from a Cisco IOS device in a single text file.
- Configuration generator with python and Jinja2 - This post describes, how to build a simple configuration generator using python and Jinja2. I'll explain it using CSV and JSON based parameter files.
- Cisco NX-API on Nexus 5500 - This post gives you a short introduction to the Cisco NX-API on Nexus 5500 with NX-OS 7.2
- Custom filters for a Jinja2 based config generator - In this post, I'll explain how to include custom filters in Jinja2 and how to use them within the configuration templates
- Implement HSRP using ciscoconfparse - This post describes an example to create a configuration for HSRP based on an existing Cisco IOS configuration using the ciscoconfparse module
- python dictionaries and JSON (crash course) - Just a quick crash course about the use of python dictionaries and the JSON data format
- HTTP calls using the python requests library - How to use the requests library in python based on the example code from the Cisco NX-API post ("interface description cleaner")
- Reconfigure static ARP entries using ciscoconfparse - This post describes how to parse an existing configuration and reconfigure it using the example of static ARP entries (from Cisco VSS to Cisco vPC)
In the post about Vagrant you can find a description how to execute the examples without affecting your current environment.