Cisco configuration using Ruby

M

Matt Lawrence

I haven't had the opportunity to write any code for a few months now, so
I've gotten just a bit rusty. I need to make configuration changes,
including firmware updates, to a number of smaller Cisco routers and
switches (mostly Catalyst 2900XL series). Since I do have telnet access
to the equipment, I'm considering writing a few fairly simple Ruby scripts
that use Net::Telnet to go out, grab the configuration, parse through the
details and then make the appropriate changes.

What do y'all think? Any other modules that I should look at? Other
suggestions?

-- Matt
Nothing great was ever accomplished without _passion_
 
R

Robert Klemme

Matt Lawrence said:
I haven't had the opportunity to write any code for a few months now, so
I've gotten just a bit rusty. I need to make configuration changes,
including firmware updates, to a number of smaller Cisco routers and
switches (mostly Catalyst 2900XL series). Since I do have telnet access to
the equipment, I'm considering writing a few fairly simple Ruby scripts
that use Net::Telnet to go out, grab the configuration, parse through the
details and then make the appropriate changes.

What do y'all think? Any other modules that I should look at? Other
suggestions?

Some of these might help also, if only to look at the source code and get
ideas:
http://raa.ruby-lang.org/cat.rhtml?category_major=Library;category_minor=Process

robert
 
D

Dave Halliday

You might want to try using SNMP to read the configuration information.
It may save you writing parsing code for the Telnet output.

You can get SNMP for Ruby from here:

http://snmplib.rubyforge.org/

The list of supported MIBs for the Catalyst 2900XL is available by
anonymous FTP:

ftp ftp.cisco.com
cd /pub/mibs/supportlists/wsc2900xl

Cheers,

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,608
Members
45,241
Latest member
Lisa1997

Latest Threads

Top