Cisco IMC 3.0 includes the Redfish server management API to help automate common management tasks. Redfish provides a scalable, secure way to manage your servers that complements the Cisco UCS Unified API that is also part of the IMC.
Programming Your Server Infrastructure
“DevOps” is a frequently used term, and the “Dev” emphasizes that a large part of any DevOps tool or process is Development. Any type of software development requires programming, and all programming requires an application programming interface, or API, to control whatever is being programmed. “Hello World” in your favorite programming language still uses an API (or multiple APIs) to get characters printed on the screen.
In the world of server infrastructure management, APIs are the key to managing the wide variety of physical and logical resources that make up a server. From BIOS settings to management controller user accounts, a complete API will let you control all server resources in the automation framework of your choice. Since release in 2009, all Cisco UCS platforms have provided a scalable, secure API that provides complete control of all aspects of server management. Cisco UCS has also supported legacy management standards such as IPMI to allow UCS management through a wide variety of management tools.
As part of a push to modernize standards like IPMI, the Distributed Management Task Force (DMTF) has developed the Redfish server management standard. Redfish helps secure server management with all traffic passed over the web standard application layer protocol HTTPS on the standard HTTPS port. Redfish also specifies use of a RESTful API, and more than just specifying a RESTful API Redfish also specifies use of the Open Data Protocol, or OData, RESTful API standard. OData is used by many enterprise software application suites and helps ensure interoperability of “RESTful” APIs.
Comprehensive Management: Redfish and the Unified UCS API
While Redfish provides a way to query server resources and perform some common actions like server power on/off, operations such as storage controller configuration are not currently part of the specification. Fortunately, the IMC’s UCS Unified API can be used to complement the Redfish API and provide additional functionality where needed. Like Redfish, the UCS API is built on top of an object model with objects organized into a tree structure. The UCS API also uses HTTPS and even the URLs used to access resources are similar between the Redfish and UCS API (IPs, ports, and user credentials are the same with either API). When programming operations are performed in a higher-level scripting language like Python, many of the specific API differences are abstracted away.
Cisco is also actively working to extend the capabilities of Redfish. With Cisco IMC 3.0, extensions are provided for firmware update and IMC management including technical support downloads, IMC configuration backup, and IMC configuration restore. Visit this GitHub repository to see a Python scripting example of both APIs in use with a common configuration file.
Also, check out this demo video which shows how the Redfish and UCS APIs can be used together for complete server management.
For additional information on Cisco IMC 3.0 and Redfish, visit the following sites:
Is it possible to use this programming construct to configure C-240M4 BIOS for certain functions like the following :
1.) To make IPMI SOL work. We need to enable BIOS console direction and SOL. 2.) To make IPMI user work Disable strong password 3.) To makeIPMI LAN work Enable IPMI over LAN
If someone can point me in the right direction to enable these on new systems via a script or API calls to UCS, it would be highly appreciated.
IPMI configuration is not possible through Redfish, but you can view IPMI and other communication services settings through Redfish. Here is an example:
IPMI can be configured through the XML API. See the IPMI over LAN sections of the XML API programmers guide (http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/c/sw/api/2-0/b_Cisco_IMC_api_for_3x60_servers/b_Cisco_IMC_api_3x60_chapter_01011.html ).
While the IMC XML API is available on UCS E-Series servers, the RedFish API does not appear to be (as of version 3.1). Is RedFish support expected to come to the E-Series servers?
When I try the below API on a different (UCS 240 M3) server which has both VIC and on-board 1G quad-port card, API is returning both VIC and On-board NIC information a well.
"@odata.id":"/redfish/v1/Systems/ABCD123456/EthernetInterfaces/L.1" à Quad-port 1G card – por-1
},{
"@odata.id":"/redfish/v1/Systems/ABCD123456/EthernetInterfaces/L.2" à Quad-port 1G card – por-2
},{
"@odata.id":"/redfish/v1/Systems/ABCD123456/EthernetInterfaces/L.3" à Quad-port 1G card – por-3
},{
"@odata.id":"/redfish/v1/Systems/ABCD123456/EthernetInterfaces/L.4" à Quad-port 1G card – por-4
},{
"@odata.id":"/redfish/v1/Systems/ABCD123456/EthernetInterfaces/2.0" à VIC card – por-1
},{
"@odata.id":"/redfish/v1/Systems/ABCD123456/EthernetInterfaces/2.1" à VIC card – por-2
}],
"Description":"Collection of EthernetInterfaces for this System",
It appears that the API is looking for VIC card and trying to combine (concatenate) the output with other NIC card info and when VIC card is not present, it is returning with programmatic error ‘concatenate of 2 outputs when one is empty)
Getting Started
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: