device-checker
A script that connects to network devices and checks for the presence of commands (globally/per interface) defined in a basline file
Requirements
netmiko==3.2.0
paramiko==2.7.1
prettytable==0.7.2
pyaml==20.4.0
Installation
git clone https://github.com/catachan/config-checker.git
cd config-checker
Create virtual enviroment (optional)
python3 -m venv config-checker
source config-checker/bin/activate
install dependencies
pip install -r requirements.txt
Online mode
connect to device defined in connection.yaml file via ssh and collect "show run" and additional show command output and check against config in baseline.yaml
python main.py -b [baseline.yaml] -c [connection.yaml]
Offline mode
check config files in directory (one per device) against baseline.yaml file. Please notice that only "show run" output can be checked in offline mode
python main.py -b [baseline.yaml] -d [config directory]
Optional parameters
display/log only failed check/ suppress passed checks
log also to json file additional to console output. The report file contains also the raw data that was checked
log console output also to logfile (so you are able to see the complete output later on)
Samples for baseline.yaml and connection.yaml in examples directory
Convert to windows exe
To convert the python file use python package auto-py-to-exe.exe
pip install auto-py-to-exe
auto-py-to-exe