Junos Automation (Scripting)
Junos Automation (Scripting)

PERL Configuration Comparison Script

‎02-01-2011 07:30 AM

  I'm looking to develop a PERL script that will gather and compare certain portions of the configurations of two M series routers (Using NETCONF, with the config in XML format).  I'm thinking of using the XPath PERL add on to extract the portions of the config I'm interested to compare.  The tricky part is that when I compare the XML I don't care if the nodes are in a different order, as long as the same nodes exist in the same places in the hierarchy.  I haven't yet found a PERL module that claims to do this.  Does anyone have any advice on what modules/tools to use?  Perhaps I'm going about this in the wrong way and there are other mechanisms that would be easier, any advice would be appreciated.