This lab can be completed if you have access to the server infrastructure in a private lab or if you are at an event such as Cisco Live!
Module: ACI Toolkit
The purpose of this learning lab is to explore some of the basics of the Python acitoolkit library, which consolidates and simplifies much of the underlying REST API commands.
After completing this module you will be able to:
- Understand the terminology used in describing the ACI topology.
- Program some basic toolkit functions in Python to create and link network elements in ACI.
- Examine and interpret JSON output.
The Python ACI toolkit uses the REST API to modify and retrieve configuration information. We will guide you through the Python tutorial code, if you are not familiar with it. There is also a Coding 101: REST API Basics Lab, which is an excellent resource to learn how REST and JSON work.
You can also benefit from this lab if you are familiar with:
- Python (As a programming language)
- REST (Representational State Transfer)
A Python 2.7 tutorial script which makes REST APIC API calls will be the examples for this learning lab.
#Three HTTP methods are used in the ACI toolkit
All of the toolkit functions actually issue HTTP REST requests underneath, but they might do several REST requests in sequence. All REST requests use the following HTTP commands:
These low-level commands are not covered in this module, but the following links might help for this lab:
Please refer to ACI Toolkit Package to access the full acitoolkit API documention. For Python API/SDK descriptions, refer to the ACI Python API Documentation page, the APIC REST API User Guide for information on composing and sending commands and queries via the REST API, and the APIC Getting Started Guide for detailed procedures of many common tasks using the API.
Before we begin, some background on the ACI object model and terminology is in order.