Script to grab the version number of multiple switches by leveraging multiprocessing.
Install required packages using the requirements.txt
pip install -r requirements.txt
- Open the my_devices.py and input the IPs of the switches you want to connect to.
device_ips = {
"192.168.1.10",
"192.168.1.8",
"192.168.1.7",
"192.168.1.3",
"192.168.1.6"
}
- Run the script
python show_ver.py
- The script will ask for a username and password. These will be stored to be used on all the switches.
Enter standard username: cisco
Enter standard password:
- The script will log into as many switches as it can and print the
show version
output.
TBD
- Done!
This script can easily be modified to pull any other command. You use just replace the sh_ver
and parse_ver
values. Please reference Netmiko and ntc-templates for more information.