Managing Cisco Routers / Switches with Python, Take 2

Here is my script to date. It’s functional and works pretty well, in my limited testing.

I’ll put my future revisions on github.com/jtdub/pyMultiChange

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone

October 10, 2013

Posted In: Cisco Administration Python Scripting, IOS, Python Tips, System Administration

Configuring Cisco routers and switches with Python

Update: I’ve updated the multichange script a lot since I first wrote about it. You can use the category function to see the various posts.

You can also look at my github for pyRouterLib and pyMultiChange.

In my new job role, I’ve been rediscovering the limitations of the Perl Module Net::Telnet::Cisco when executing mass changes to network devices, so I’ve been looking for alternatives. Particularly, Net::Telnet::Cisco doesn’t play nicely with NX-OS, IOS-XR, or Arista EOS – without a major re-write. So, I’ve been experimenting with a Python implementation. Below is what I have so far, which is working well, but is far from production ready.

I need to implement the getopt Python module to make it more command line friendly. I’m sure that I’ll also find some tweaks that I need to make here and there as I experiment with other devices. So far, it works pretty well with IOS devices. I’ll post updates as it becomes more stable, user friendly, and over all useful. This is just what I’ve come up with in a couple hours of tinkering and reteaching myself Python.

Share on FacebookTweet about this on TwitterShare on LinkedInShare on RedditEmail this to someone

October 8, 2013

Posted In: Cisco Administration Perl Scripting, Cisco Administration Python Scripting, IOS, Python Tips