Sample code how to use the Cisco ACI REST API to gather faults and fabric healths over 1 or several ACI fabrics. The results are filtered and presented in an easy to consume format.
This sample code illustrate how an administrator could use the API and adding simple business logic to filter out events which are older than X amount of days (Default 7).
Tested with Python3.9.2
pip install -r requirements.txt
The script will prompt the user for username and password for each fabric which is being iterated. It is up to the user to securely handle their credentials.
python3 main.py
python3 main.py -f customfabric.json
python3 main.py -d 14
python3 main.py -l 1000
python3 main.py -d 3 -l 20 -f customfabric.json
python3 main.py -h
A great way to try this sample code is by using it against ACI Simulator v4. DNS name and credentials for the sandbox could be found inside the detailed description of the sandbox.
The APIs and the code was tested 15th of July 2021
This section should detail why people should get involved and describe key areas you are currently focusing on; e.g., trying to get feedback on features, fixing certain bugs, building important pieces, etc. Include information on how to setup a development environment if different from general installation instructions.
General instructions on how to contribute can be found in the CONTRIBUTING file.