« Back to Technical Discussions

How do I retrieve Fabric Interconnect serial numbers via XML API?

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi,
 
I'm trying to retrieve the serial numbers from the Fabric Interconnects using the XML API.  Initially I was testing against the UCS emulator but that does not supply serial numbers to the FI's.  Using wireshark though I was able to narrow down a likely XML command to:
<configResolveChildren classId='mgmtController' inDn='sys/switch-A'/>
 
The results however are not what I was looking for.  I tried testing the XML against a real environment and the serial field still comes back blank.
 
Anyone have suggestions on how I can retrieve that information?

Hi,
 
I'm trying to retrieve the serial numbers from the Fabric Interconnects using the XML API.  Initially I was testing against the UCS emulator but that does not supply serial numbers to the FI's.  Using wireshark though I was able to narrow down a likely XML command to:
<configResolveChildren classId='mgmtController' inDn='sys/switch-A'/>
 
The results however are not what I was looking for.  I tried testing the XML against a real environment and the serial field still comes back blank.
 
Anyone have suggestions on how I can retrieve that information?

 
Sage,
 
The UCS class that you want to query is networkElement try
 
<configResolveClass cookie="the-cookie" inHierarchical="false" classId="networkElement"/>
 
The response will have the serial number for the Fabric Interconnect
 
John

Hi John,

That query worked perfecty, thank you!

Do you have a suggestion on how I could have discovered that command via wireshark?

Sage

Nevermind, I think I've got it figured out now. I was trying to capture packets immediately prior to displaying them in the UCSM. Instead I started wireshark before logging into the UCS and it was at that point I saw all of the classIds used to cache system details. For the benefit of those to come, the query used was:

<configResolveClasses cookie="TheCookie" inHierarchical="false>
<inIds>
<classId value="computeBlade" />
<classId value="equipmentIOCard" /
<classId value="etherPIo" />
<classId value="etherSwitchIntFIo"
<classId value="adaptorExtEthIf" /
<classId value="etherServerIntFIo"
<classId value="adaptorUnit" />
<classId value="networkElement" />
<classId value="topSystem" />
<classId value="equipmentChassis"
<classId value="fcPIo" />
<classId value="equipmentSwitchCar
<classId value="portGroup" />
<classId value="mgmtEntity" />
</inIds>
</configResolveClasses>

Sage,

It may have been a bit difficult, when you first start the GUI many queries are made to populate the interface, one of them would have been for Fabric Interconnect information. The query may nor may not have been directly for networkElement. The networkElement object may have been retrieved as a child object of another query. I've not analyzed the initial queries made when populating the interface.

Are you familiar with Visore? You can get to it at http://<ucs-ip-address>/visore.html This interface allows you to browse the objects of the UCS.

Also you can right click on either Fabric Interconnect in the GUI and click the Copy XML option. Paste into notepad or some other text editor and you'll be able to see the networkElement object and its attributes.

Hope that helps.

Regards,
John

Ahh, you got it!!