Exploring the Cisco UCS Manager XML API Management Information Tree
The Cisco UCS Manager is an application that manages the Cisco compute. It is an XML application that is built around an HTTP-based XML API. From one side, the administrators and third-party applications communicate with the Cisco UCSM through the XML API for configuration and monitoring purposes. The API also supports integrations with third-party hardware and software.
From another side, the XML API exposes the representation of the underlying physical and logical resources. These resources are abstracted and represented as objects with the needed attributes to describe them by the DME in an MIT. In Figure 19-10, we can see a similar approach to the Cisco NX-OS APIs.
Figure 19-10 Cisco UCSM MIT
Each of the objects in the hierarchical structure of the MIT is described with attributes that represent the configuration and the state.
The managed objects in the MIT have unique distinguished names (DNs), which describe the object and its location in the tree.
The DME centrally stores and manages the information model, which is a user-level process that runs on the Fabric Interconnects. When a user initiates an administrative change to a Cisco UCS component (for example, applying a service profile to a server), the DME first applies that change to the information model and then applies the change to the actual managed endpoint.
The Cisco UCS Manager XML API supports operations on a single object or an object hierarchy. An API call can initiate changes to attributes of one or more objects such as physical hardware, policies, and other configurable components. The API operates in forgiving mode. Missing attributes are replaced with applicable default values that are maintained in the internal DME.
To examine the MIT, you can use the built-in Cisco UCSM and CIMC-managed object browser. It’s called Visore (see Figure 19-11) and can be accessed at the following URL: http://<UCSM/CIMC-IP-Address>/visore.html.
Figure 19-11 Cisco UCSM Visore
Visore uses the Cisco UCS XML API to query the DME for information on the managed objects. For each object, you can see all its information, including child and parent objects, to which class it belongs, and more. A pink background color is used for the fields that display the managed object instances and the class name. The property names have a green background, and the values are in yellow.
There is also a reference to the Cisco UCS Manager information model on the Cisco DevNet site, which can be accessed and researched for free at the following URL:
https://developer.cisco.com/site/ucs-mim-ref-api-picker
Cisco UCS PowerTool suite is a set of PowerShell modules that helps automate all aspects of Cisco UCS Manager. It also helps automate server, network, storage, and hypervisor management. Cisco UCS PowerTool suite enables easy integration with existing IT management processes and tools. The PowerTool cmdlets work on the Cisco UCS MIT. The cmdlets can be used to execute, read, create, modify, and delete operations on all the UCS managed objects (MOs) in the MIT. Cisco UCS PowerTool 2.0 also provides support for Microsoft’s Desired State Configuration (DSC).
An additional functionality, which helps administrators understand the MIT and how to use it with the Cisco UCS PowerTool, is the ability to convert actions in the UCS Manager GUI into DSC configuration code. This functionality is provided by the ConvertTo-UcsDSCConfig cmdlet.
The Cisco UCS Python SDK is a Python module that helps automate all aspects of Cisco UCS management, including server, network, storage, and hypervisor management, similar to Cisco UCS PowerTool. Just like Cisco UCS PowerTool, the Cisco UCS Python SDK also performs similar functions on the Cisco UCS Manager MIT in that it creates, modifies, and deletes managed objects in the tree.