pyMultiChange rewrite and Netlib

I re-wrote ‘pyMultiChange‘ around my new library for connecting and managing devices. Before I was using ‘pyRouterLib’, but now I’ve deprecated that library with the creation of my new library ‘netlib‘.

Netlib is super easy to use and is more complete than pyRouterLib was. Utilizing Netlib, allowed me to cut the code in pyMultiChange by almost half and netlib is more flexible and user friendly.

To use netlib, first clone the git repo and install the necessary python libraries:

After that, you’re ready to go. Accessing network devices via telnet and ssh are currently supported. Both have a very similar API syntax, that is layed out in the README on github.

Here is an example of how to use the ssh module:

How easy is that? I’m stoked about netlib. It should make rapidly creating code for interact with network devices pretty trivial. I’m experimenting with SNMP functionality, though it’s not ready for prime time.

I also have a method for storing and reading user credentials, so that they don’t have to be stored in the script, called every time a script is run, or entered manually for every device that is accessed.

Let me know what you think, add feature requests, or do a pull request. :)

August 26, 2015

Posted In: Cisco Administration Python Scripting, Python Tips