Monday Jun 04, 2018

UCS-M Capability Catalog

As a Cisco SE for UCS I've always been doing a lot of programming and scripting using the XML-API of the Fabric Interconnects. Sometimes simply with bash and curl, often doing Perl and at other times using PowerShell and PowerTool. One thing that always bugged me is the inconsistency of attributes like part id's, model names, etc. Especially in the early days of UCS there was little logic in that naming. However in later years things got better and more consistent.

As an example, if you query the "memoryUnit" class (which are the DIMMs in the server) it will return over thirty attributes – like size and speed – but none of them is the part number as on the Cisco price list. What comes closest is the Model field, but that is the part number as given to that part by the OEM, for example Samsung. Question then becomes quickly how to correlate that to the Cisco PID. Often I had in my scripts to resort to building tables that would translate one to the other, which is a lot of work and also requires constant updating.

We have to make a little side-step to discuss how to query the UCS API. Yes you can start digging in by building code, but there is a very handy tool that allows you to browse the UCS Domain Object Model interactively. Point your browser to "http://<ip-address>/visore.html" of your Fabric Interconnects. You will be asked to login. In the "Class or DN" field type for example "memoryUnit" (case sensitive) and it will show you all objects of that class, which means it will list all DIMMs in your system. The arrows behind the "dn" attribute allow you to move up to parent objects or down to list children objects. If you like to start at the top of the DOM, you can enter the class "topSystem" with the root object "sys" (this is the physical view like chassis" and blades) or the class "orgOrg" with the object "org-root" (which is the logical view containing things like service profiles, policies, pools, etc.).

UCS Layout

Now back to part id's and names. If you look into the Inventory tab of the UCS GUI, you see very clear names and descriptions, but you won't find those in the classes for those components. That gets stored in the "capabilies catalogue". But when you search the class "capabilityCatalogue" (which exists) you will find nothing useful. Instead search the class "equipmentManufacturingDef" (this query can take half a minute, so be patient) which will give clear attributes for over a thousand parts. And with PowerShell you can collect and store all that data into a table.

Get-UcsManagedObject -classid "equipmentManufacturingDef" | 
                                   Export-Csv -NoType C:\Temp\ucs-catalogue.csv

Now search in your browser that Visore page for "UCS-MR-1X322RV-A" and you will find two occurrences from different memory vendors. You will also see the "oemPartName" which is what we found earlier as the "model" attribute in the memoryUnit class.

From there you can take it further as far as you want to. But now you have access to the proper description, sku, pid and similar fields.