ACI Automation & Scripting - DCLessons
ACI Automation & Scripting - DCLessons
[email protected]
LOCATION
AF
(/) (mailto:[email protected])
Below are three HTTP(S) method which is used by client to send request:
RECENT POSTS
• GET: It retrieves a set of information or resource which has been
asked by client. Cisco SASE
• POST: It send some parameters, that is used to configure ACI fabric, it Architecture
either create or updates any resource. (https://www.dclessons.com
• DELETE: It removes certain parameters or delete any particular /viptela/cisco-sase-
resource. architecture)
In POST & DELETE methods, even though they are called multiple times, SASE vs SD-WAN
there will be no effect and hence are termed as idempotent. In GET method, (https://www.dclessons.com
even though it is executed multiple times, there will be no change in MIT /internet-of-things-
object model and hence it is termed as nullipotent. iot/sase-vs-sd-wan)
While using REST API, the Correct URI must be provided, in order to get valid What is SASE
and correct response. (https://www.dclessons.com
/internet-of-things-
As Example, if we want to get information about tenant DCLESSONS, we
iot/what-is-sase)
need to use following URI:
Accessing Amazon S3
https://{{apic-host-or-ip}}/api/mo/uni/tn-DCLESSONS.json using AWS private Link
if we want to pull some information, from a node managed object, we need in Secure hybrid
to use below URI, where the resource path contains the DN of managed method.
Object. (https://www.dclessons.com
/aws/accessing-
https://{{apic-host-or-ip}}/api/mo/topology/pod-1/node-101/sys
amazon-s3-using-
/ch/ftslot-1.json
aws-private-link-in-
secure-hybrid-
ACI basic Automation tools method)
ACI provides some tools, through which we can do basic Automation, these Cisco Smart Licensing
tools are some where described below and as shown in figure. Policy
• API Inspector (https://www.dclessons.com
• Object Save As /nexus/cisco-smart-
• Visore licensing-policy)
• MOQuery Cisco Certification – A
Closer Deep-Dive Look
(https://www.dclessons.com
/lisp/cisco-
certification-a-closer-
deep-dive-look)
Cisco DNA-Spaces :
Monitoring IOT
Network
(https://www.dclessons.com
/internet-of-things-
iot/cisco-dna-spaces-
monitoring-iot-
network)
MEMBERSHIP
PLAN
$100/Monthly
You need to understand the JSON script, before you start your scripting.
Below is the body of JSON format.
$200/6 Months
The properties of the child object class start with the key word “children” in
double quotes and a colon followed by a square bracket ([).
The last child object class does not have a comma at the end but rather a
closing square bracket and curly brackets for the top-level parent object
class(es).
Object Save as
With this method, you can download the configuration payload via XML also
other than Json format.
Now, once you save the configuration, it will not give you URL. So you need
to build the URL for any certain managed object.
https://<apic_IP>/api/node/mo/
Once done, you will be asked to provide APIC credentials to login in to it. In
below figure you can see Visore (Object store Browser) where you can query
any class of object or DN of managed Object in entire MIT.
In above figure, we have queried bridge domain class fvBD. Visore will pull
out all 47 managed object and their properties.
We can also query property of an object of a certain class. Let say, we want
to pull all the objects that contain certain EPG via query EPG object class
fvAEPg.
MOQuery
MOQuery is a CLI based tool which is used to browse objects in MIT. It is not
only used for automation scripts but also used for troubleshooting events.
In order to find the MOQuery command line Help we should use following
commands.
Command to find a Class (-C)
MOQuery to find the a DN (-d)
MOQuery to find an EPG Class and Filtering on name DCLESSONS-WEB-Epg
(https://www.dclessons.com/register)
Comment
You are will be the first.
LEAVE A COMMENT
Please login here (https://www.dclessons.com/login) to comment.