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

(andrew) #1

use the configFindDnsByClassId method. This
method finds distinguished names and returns them
sorted by class ID. The curl command should look
similar to the following one:


Click here to view code image


curl -k -X POST https://10.10.20.110/nuova \
-H 'Content-Type: application/xml' \
-d '<configFindDnsByClassId
classId="computeItem"
cookie="1573019916/7c901636-c461-487e-bbd0-
c74cd68c27be" />'

The XML API endpoint, https://10.10.20.110/nuova,
and the Content-Type header, application/xml, stay
the same. The XML data that is being sent to the Cisco
UCS Manager server is different. First, the
configFindDnsByClassId method is specified, and
then the two mandatory variables for classId and the
cookie are passed in. The classId specifies the object
class that in this case is the computeItem class, and the
cookie is being populated with the value of the
authentication cookie obtained previously.


The response in this case, as shown in Example 9-8,
contains a complete list of all the compute items that are
being managed by the 10.10.20.110 instance of Cisco
UCS Manager.


Example 9-8 List of Compute Items That Are Being
Managed by Cisco UCS Manager


Click here to view code image


<configFindDnsByClassId
cookie="1573019916/7c901636-c461-487e-bbd0-
c74cd68c27be"
response="yes" classId="computeItem">
<outDns>
<dn value="sys/chassis-
4/blade-8"/>
Free download pdf