Check portstatus of aci spines
The code is used to check the port status of all spine switches in an cisco application centric infrastructure via api. The code is used for a one time live check.
You need to install python3.8 or higher to run the code. You need to install the following modules:
- requests
- json
- os
You can define enviroment variables (ACI_URL, ACI_USER, ACI_PASS) or enter the parameters initial at the start of the script. For multiple use, we recommand to configure enviroment variables.
(venv) $ python aci_spine_portchecker.py
Enter ACI url: https://10.10.20.14/
Enter ACI username: admin
Enter ACI password: C1sco12345
Host: https://10.10.20.14/
Device | Interface | Status
spine-1 | eth14/32 | up
spine-1 | eth14/3 | up
spine-1 | eth17/30 | up
spine-1 | eth14/7 | up
spine-1 | eth9/3 | up
spine-1 | eth9/13 | up
spine-1 | eth14/5 | up
spine-1 | eth14/29 | up
<output omitted>
Tested with Cisco ACI Multi-Site Orchestrator reservable sandbox.
Last tested un August 2022.
Some json format issus when login or data gathering fails will be fixed in the future.
If you have questions, concerns, bug reports, etc., please create an issue against this repository.
This project was written and is maintained by the following individuals:
- Benjamin jung [email protected]