I'll like to show you today, how to extract the commands and the associated output from multiple CLI session logs using a simple python script. It doesn't matter if you work programmatic or by hand with this data afterwards, a clear structure is always very useful.
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.
In one of my earlier posts, I parse IP parameters from an existing Cisco IOS configuration using ciscoconfparse. In this post, I'll like to provide some basic patterns how to parse (almost any) information from a running configuration, but first without using any library. I just take a look at the python standard library and regular expressions (RegEx).
Today I'll like to give you a brief introduction to a small Web service that I've created earlier this year: the Product Database. The primary functional goal of this Web service was to automate Cisco EoL checks using a central database.