This prototype utilizes the ACI REST API to get all EPGs and contract relations configured in APIC. The Python script generates the following:
An overview csv file which provides a summary of how many application EPGs and contracts relations are there in each tenant. Then there’s a csv file for each tenant that shows the application profiles, EPGs and contracts(type and state). An empty tenant file indicates a tenant with no application profiles and EPGs.
- Roaa Alkhalaf
- APIC
- ACI
- ACI REST APIs
- Python
The following commands are executed in the terminal.
-
Set up a Python virtual environment. Make sure Python 3 is installed in your environment, and if not, you may download Python here. Once Python 3 is installed in your environment, you can activate the virtual environment with the instructions found here.
-
Access the created virtual environment folder
$ cd your_venv
-
Clone this repository
$ git clone https://wwwin-github.cisco.com/gve/gve_devnet_aci_epgs_contracts_export.git
-
Access the folder
gve_devnet_aci_epgs_contracts_export
$ cd gve_devnet_aci_epgs_contracts_export
-
Install the dependencies:
$ pip3 install -r requirements.txt
-
In
.env
, fill out the ACI credentials:
base=<https://IP-address/api>
user=<Username>
password=<Password>
-
To generate the CSV files, type the following command in your terminal:
$ python3 main.py
Provided under Cisco Sample Code License, for details see LICENSE
Our code of conduct is available here
See our contributing guidelines here
Please note: This script is meant for demo purposes only. All tools/ scripts in this repo are released for use "AS IS" without any warranties of any kind, including, but not limited to their installation, use, or performance. Any use of these scripts and tools is at your own risk. There is no guarantee that they have been through thorough testing in a comparable environment and we are not responsible for any damage or data loss incurred with their use. You are responsible for reviewing and testing any scripts you run thoroughly before use in any non-testing environment.