This example script shows how you can leverage the ACI Toolkit as part of a Python script connecting to an APIC Controller.
This basic script simply connects to the APIC and displays the list of tenants and is based on the sample aci-show-tenants.py script from the toolkit.
To run this script, you'll need to have installed the ACI Toolkit in your working Python environment. See github.com/datacenter/acitoolkit for installation instructions.
This script targets the Always On ACI Simulator DevNet Sandbox.
Find details on the Sandbox here.
To execute this script against a different device, update the variables that list the URL, User and Password for the APIC.
- Python 2.7
- acitoolkit
-
Clone the Python Examples and change into the directory.
git clone //github.com/CiscoDevNet/python_code_samples_network cd acitoolkit_show_tenants
-
Run the script
$ python aci-show-tenants.py TENANT ------ Tenant_Max common infra SB-T01 mgmt