Skip to content

a way to capture data from an IOS XR router and in a deterministic way find the differences and output any changes

License

Notifications You must be signed in to change notification settings

smilstea/IOS-XR-Maintenance-Window-Checker

Repository files navigation

About
IOS XR Maintenance Window Checker is a collection of scripts used to gather data from an IOS XR router multiple times and in a deterministic way find the differences and output any changes in a simple to read manner.

Installation Notes


Scripts were written and tested using python 3.6.8


No installation is required or compiling of the scripts, only requirement is python 3 with following libraries:

  • pexpect
  • os
  • sys
  • getpass
  • re

In addition if telnet is the method of transport the telnet package on your system must be installed (not just the pexpect package).

Running the Scripts


To call the scripts make sure their permissions are set to executable then call them like so (telnet is default for gatherer):

python ios_xr_mw_gatherer.py --file pre_mw_file --ipv4addr 172.18.120.188 --username smilstea --ssh

python ios_xr_mw_gatherer.py --file post_mw_file --ipv4addr 172.18.120.188 --username smilstea --ssh

python ios_xr_mw_comparer.py --pre pre_mw_file --post post_mw_file --compare comparison_filename


Syntax for each file is below:

Usage: python ios_xr_mw_gatherer.py [--file ][--ipv4addr ]--username (--timeout ) (--vsm)

Usage: python ios_xr_mw_comparer.py [--pre |--post ]--compare (--vsm)


Special Keywords


--timeout Specifies the timeout from commands, by default this is 10s for a few reasons.

  1. Because some commands may not output immediately
  2. Some commands pause mid-way through output
  3. General delay in getting data output This allows for the collection of outputs properly as they are generated and a pause in case a command does not output immediately, pauses, or python catches up to the end of the available data Using this keyword and changing the timeout is NOT recommended unless a command is taking longer than 10s to complete.

--vsm Specifies to get ASR9K VSM specific outputs, without this option no VSM commands will be run


--minimal Reduces the output of the comparer script so that only WARNING messages are output on the terminal and only a summary view like without this keyword are printed to the compare file. Without minimal a summary of all commands whether there is an alarm raised or not will be printed, and in the compare file a full dump of all the 'relevant' data used for comparions which is very verbose


Output


Some output will be displayed on the screen, but this is kept to a minimum, only displaying differences or a summary for each command. Outfiles will have the full outputs.


Bugs / Enhancements / etc


Contact [email protected] for any issues, please include terminal logs and the output files for faster debugging.


Don't see a feature or command you want in this tool, contact [email protected] preferably with examples.

About

a way to capture data from an IOS XR router and in a deterministic way find the differences and output any changes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published