Cisco configuration using Ruby

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_

"Matt Lawrence" <matt@technoronin.com> schrieb im Newsbeitrag news:Pine.LNX.4.61.0412312049530.11787@oberon.technoronin.com...

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

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

ยทยทยท

On Dec 31, 2004, at 9:52 PM, Matt Lawrence wrote:

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_