
When you want to retrieve information from network equipments, you can use :
- Web interface (usually disabled for security purpose, and slow)
- CLI (fast but can take a long time if you have many switches)
- Management platform like IMC, Airwave or Prime infrastructure (not very convenient, require often a lot of time to configure, slow)
So I looked for another solution more modular. I am using scripts in python with Netmiko library. I am using a centos VM with following packages installed:
- python3
- pip3
You can install netmiko using pip like this :
pip install netmiko
I was working with Aruba OS. For those who know, the HP CLI is very slow when started, you have a long stop time after the CLI is ready :

So you have to change a timer when you call the connectHandler method, if not, you have a random output error when you try to run the script :
device = ConnectHandler(global_delay_factor=2,device_type=platform, ip=IP, username=username, password=password, blocking_timeout=16)
I am not a master in python and I always search on google to find how to developp properly, but I was able to create some usefull script to retrieve data. I will share some of them in another post.