Today, I like to write about a small and very basic topic. I think everybody requires from time to time the output of certain CLI commands on a set of devices, e.g. for troubleshooting. Quite often, no direct access to the devices is possible, therefore you need to ask somebody else to collect the data. In many cases, you just get plain session logs from e.g. putty and they are in many cases quite unstructured.
This post is the last one within a series that I’ve created primarily at the beginning of 2016. The topic was on How to build your own Network Config Generator. The last post within the series was some time ago and I like to finish it today with a short review of the process and my experience during the time.
Almost a year ago, I start a side project to create a web service that automates End-of-Life (EoL) checks. It targets primarily to equipment from Cisco Systems. My primary intention was to learn Django and some other web technologies. Furthermore, I liked to play with the Cisco API console (more specific the Cisco EoX API). I used the first version now for quite some time. Some months ago, I decided to extend this Project a little bit. The first step was a review of what I’ve done last year. I recognized fast that the code needs some updates...
Today, I like to give you a brief introduction to a python library called invoke that is used to execute custom tasks within a shell session. Furthermore, I like to show you how invoke is used to simplify the execution of Ansible playbooks within the Product Database.
In my last post, I took a look on how to parse information from a Cisco IOS configuration using regular expressions. This post focuses on the same use case as the last one, but this time I use the ciscoconfparse library. The use of the library doesn't mean that you can ignore regular expressions at all. You need at least a basic understanding of it. Before continuing, I highly recommend to read my last post about Parse Cisco IOS configurations using RegEx. I will reuse some of the RegEx and skip the detailed explanation in this post.