cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2830
Views
6
Helpful
6
Comments
dsoper
Cisco Employee
Cisco Employee

Introduction

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:

6 Comments
damien_p581
Level 1
Level 1

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 make
IPMI 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.

dsoper
Cisco Employee
Cisco Employee

IPMI configuration is not possible through Redfish, but you can view IPMI and other communication services settings through Redfish. Here is an example:

$ curl --insecure -u admin:password https:///redfish/v1/Managers/CIMC/ManagerNetworkProtocol

{

"@odata.id":"/redfish/v1/Managers/CIMC/ManagerNetworkProtocol",

"SNMP":{

"ProtocolEnabled":false,

"Port":161

},

"Id":"ManagerNetworkProtocol",

"KVMIP":{

"ProtocolEnabled":true,

"Port":2068

},

"Name":"Manager Network Protocol",

"@odata.context":"/redfish/v1/$metadata#Managers/Members/$entity/ManagerNetworkProtocol",

"HTTPS":{

"ProtocolEnabled":true,

"Port":443

},

"@odata.type":"#ManagerNetworkProtocol.1.0.0",

"SSH":{

"ProtocolEnabled":true,

"Port":22

},

"IPMI":{

"ProtocolEnabled":false,

"Port":623

},

"HTTP":{

"ProtocolEnabled":true,

"Port":80

},

"VirtualMedia":{

"ProtocolEnabled":true,

"Port":2068

},

"Description":"Manager Network Service"

}

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 ).

Thanks.

justin.mcateer
Level 1
Level 1

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?

phani.penmethsa
Level 1
Level 1

Trying to retrieve Network card information of UCS C240 Rack server using Redfish API, but unable to do so, below are the details.

 

Server: UCS 240 M5SX (CIMC FW: 4.0(4h) ) 

BIOS Version: 4.0.4j.0.0831191216

It doesn't have VIC cards, but has regular quad port network adapters along with Cisco LOM card.

 

curl -X GET -u <creds> https://192.168.10.10/redfish/v1/Systems/ABC123456/PCIeFunctions/L

 

or other network slots.. curl -X GET -u <creds> https://192.168.10.10/redfish/v1/Systems/ABC123456/PCIeFunctions/1

 

or curl -X GET -u <creds> https://192.168.10.10/redfish/v1/Systems/ABC123456/EthernetInterfaces

 

resulting in the below error.

 

Spoiler

code: internal error

message: attempt to concatenate local 'VICSlotName' (a nil value)

 

Tried the below query as well and it doesn't provide any info either.

 

curl -X GET -u <creds> https://192.168.10.10/redfish/v1/Chassis/1/NetworkAdapters

 

Spoiler

Am i missing something while using the API

 

Any help or guidance is appreciated. 

Kirk J
Cisco Employee
Cisco Employee

Currently, it will only show VIC cards, which are 'managed' adapters.

 

Kirk...

phani.penmethsa
Level 1
Level 1
Thanks for your response.



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.



curl -X GET https://192.168.10.10/redfish/v1/Systems/ABCD123456/EthernetInterfaces -u --insecure

{

"Members":[{

"@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: