DevNet Associate DEVASC 200-901 Official Certification Guide by Adrian Iliesiu (z-lib.org)

(andrew) #1
"state" : "in-service",
"siteId" : "0",
"fabricDomain" : "ACI Fabric1",
"address" : "10.0.80.65"
}
}
}
],
"totalCount" : "4"
}

From the response, we can see that this ACI fabric is
made up of four devices: an APIC, two leaf switches, and
one spine switch. Extensive information is returned
about each device in this response, but it was modified to
extract and display just a subset of that information. You
are encouraged to perform the same steps and explore
the APIC REST API either using the Cisco DevNet
sandbox resources or your own instance of APIC.


As of this writing, there are several tools and libraries
available for Cisco ACI automation. An ACI Python SDK
called Cobra can be used for advanced development. For
basic day-to-day configuration and monitoring tasks and
for getting started with ACI automation, there is also a
Python library called acitoolkit. The acitoolkit library
exposes a subset of the APIC object model that covers the
most common ACI workflows.


Next, we will use acitoolkit to build a Python script that
retrieves all the endpoints from an ACI fabric. Additional
information about the endpoints—such as the EPGs they
are members of, application profiles that are applied to
those EPGs, and tenant membership, encapsulation,
MAC, and IP addresses—will be displayed for each
endpoint. A Python script that uses acitoolkit and
accomplishes these tasks might look as the one shown in
Example 9-7.

Free download pdf