Search This Blog

Thursday, June 20, 2013

Best programming languages for network appliance command line management

Automation options for network devices

There are various networking vendors out there (example Cisco, Juniper, F5, ...). Every vendor provides command line access to its device. The networking shell is usually something unique for a vendor and requires some time to master it. The most popular way to access the shell is to use SSH protocol although.

It is sad that many networking vendors doesn't supply any form of API for device configuration and management (only very few, example F5 iControl). Usually there is only command line shell or GUI.

From operational point of view it is a tedious job to try to automate your routine tasks. In practice, at the end you are going to be forced to write your own scripts and programs. Below is a list of   frameworks and libraries I've found to help me to get my job done.

As a site note, the good thing is that it is changing. Probably the most significant force behind the new technologies is SDN, Openflow and cloud.

What Perl libraries can I use to write my scripts to manage Cisco devices

http://search.cpan.org/~oliver/Net-Appliance-Session-4.131260/lib/Net/Appliance/Session.pm
http://search.cpan.org/~oliver/Net-CLI-Interact-2.131260/lib/Net/CLI/Interact.pm
http://search.cpan.org/~mingzhang/Angel_101/

What Python libraries can I use to manage Cisco devices

http://pydoc.net/Python/ciscolib/0.1/

More like a source code browser.

http://code.ohloh.net/search?s=cisco&browser=Default&pp=0&fl=Python&mp=1&ml=0&me=1&md=1&ff=1&filterChecked=true

You can always mange your SSH session manually using Python SSH libraries

http://stackoverflow.com/questions/5238000/persistent-ssh-session-to-cisco-router
http://linuxdynasty.org/219/howto-manage-your-networked-devices-using-python-and-pexpect/

What Ruby libraries can I use to manage Cisco devices

https://github.com/net-ssh?tab=repositories

Summary

From my investigation it looks that Perl has the most mature option when it comes to network devices automation libraries.

There is only few Python code available that natively supports network appliance management over SSH command line. Situation looks identical with Ruby. To write a bigger thing you would have need to manually write all code including SSH session(s) management, command execution, output delivery and redirections as well as error handling.

No comments:

Post a Comment