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

(andrew) #1
<dn value="sys/chassis-
5/blade-8"/>
<dn value="sys/chassis-
6/blade-8"/>
<dn value="sys/chassis-
6/blade-1"/>
<dn value="sys/chassis-
3/blade-1"/>
... omitted output
<dn value="sys/rack-unit-9"/>
<dn value="sys/rack-unit-8"/>
<dn value="sys/rack-unit-7"/>
<dn value="sys/rack-unit-6"/>
<dn value="sys/rack-unit-5"/>
<dn value="sys/rack-unit-4"/>
<dn value="sys/rack-unit-3"/>
<dn value="sys/rack-unit-2"/>
<dn value="sys/rack-unit-1"/>
</outDns>
</configFindDnsByClassId>

In our exploration of the Cisco UCS Manager XML API,
let’s now get more information about a specific compute
object. The method to retrieve a single managed object
for a specified DN is configResolveDn. The curl
command for this API request should look as shown in
Example 9-9.


Example 9-9 Using a curl Command to Retrieve
Information About a Compute Object


Click here to view code image


curl -k -X POST https://10.10.20.110/nuova \
-H 'Content-Type: application/xml' \
-d '<configResolveDn
cookie="1573019916/7c901636-c461-487e-bbd0-
c74cd68c27be"
dn="sys/chassis-4/blade-8" />'

Much as in the previous call, the API endpoint and
Content-Type header stay the same. The XML data
that is being sent with the request contains the method,
configResolveDn, the authentication cookie, and the
DN for which additional information is requested, which

Free download pdf