OpenNetAdmin

Track. Automate. Configure.

Home About Features Community Develop
Download this project as a tar.gz file

Config Compare, Multiple Devices

dmo

13-03-2009 07:46:15

Hi Matt / ONA Team,

I've been testing out the latest features on the demo - everything looking good.

One suggestion would be to implement some way of comparing configurations within multiple devices. It could then be used as a way of storing configurations and even comparing them. I've been looking for something to do specifically that and having it bundled in ONA would just be too cool. ;)

As we talked about, perhaps the interface for configs could be changed to make this easier. Maybe like a sub page of it's own, with just two fields (one for each device) and then choose the config from the device. The current "side by side" with syntax highlighting is great.

Thanks again! Will check back soon.

Daniel

Matt

13-03-2009 09:16:53

Hi Matt / ONA Team,

I've been testing out the latest features on the demo - everything looking good.

One suggestion would be to implement some way of comparing configurations within multiple devices. It could then be used as a way of storing configurations and even comparing them. I've been looking for something to do specifically that and having it bundled in ONA would just be too cool. ;)


I do plan on creating a better GUI interface for selecting arbitrary hosts and config entries to compare. This will probably be implemented using some of the new plugin methods I'm working on. In the mean time, I can offer a really annoying and crappy way to compare arbitrary configs!

You can use the following URL to generate the page. You will have to come up with your own values for the various IDs that it uses which can get annoying. If you hover over some of the delete/edit buttons it should show you the ID of the record in the tool tip.

https://localhost/ona/?work_space=display_config_text&old_id=210&new_id=212&host_id=266

old_id and new_id are the record ids for the configuration entries that you want to compare. Old and new is relative and only really determines right or left in the list. The host_id is required but does not have to match what the configuration is associated with.

Also, dont forget about the dcm.pl command line. It has a config_diff module that can do some of this as well.. However it is more rigid in its design (for now) and will only compare configs of a certain type for the selected host. I suspect I'll be adjusting its abilities to allow arbitrary configs to be used.

localhost: ~ $ dcm.pl -r config_diff

config_diff-v1.00
Displays the difference between selected archive entries

Synopsis: config_display [KEY=VALUE] ...

Required:
host=ID or NAME[.DOMAIN] display most recent config for specified host
type=TYPE type of config to display -
usually "IOS_VERSION" or "IOS_CONFIG"
Optional:
ida=ID First config ID to compare against idb
idb=ID Second config ID to compare against ida

Note:
If you don't pass any IDs you will get the two most recent configs
related to the host/type you provide.




As we talked about, perhaps the interface for configs could be changed to make this easier. Maybe like a sub page of it's own, with just two fields (one for each device) and then choose the config from the device. The current "side by side" with syntax highlighting is great.

Thanks again! Will check back soon.

Daniel


This is probably about what it will look like. I've got a few ideas for it but we'll see how well it all flows. :)

dmo

16-04-2009 02:50:58

Hi Matt,

Sounds pretty complex. I've been searching for ages for something that can compare Nortel Router configs (they are like Cisco configs on evil drugs - 3000+ lines of barely human readable crap).

Right now I'm using a crude perl/python script to do it. Once you get a frontend up on this one, I'll play with it and see if I can get it to work.

-- Daniel

Matt

16-04-2009 20:41:17

Daniel,

I went ahead and opened a ticket (#51) for a more robust configuration archive management interface. That way hopefully I wont forget about it and be a bit more motivated to clear the task.

For now, if you already have a method for getting the configuration, you can update your perl/python scripts to add it to the ONA archive. Just call "dcm.pl -r config_add" and feed it the data.. you can use "config=-" to read from stdin. If you want to get real adventurous, you can just use an http post to push the config directly (all dcm.pl is is a fancy front end to some web get/posts)

More to come on this front.. when I can find some time.......................