Redfish Overview

Tech Articles
Welcome Page
Introduction
Applications like Hadoop use large numbers of computers. This article provides high-level information on how Redfish can be used to automate the provisioning and support of this equipment . 

Underlying Technology
Vendors like HP and Dell provide a management interface with their computers that are used for getting support logs, rebooting the servers, et cetera. Redfish has been developed by these vendors to allow systems administrators to create scripts to automate these tasks.

Vocabulary
Some important vocabulary is API, JSON and REST (or RESTful).

API: Application Programming Interface. One popular analogy is that an API is like a waiter at a restaurant carrying on the communication between that kitchen and the diner.

JSON: JavaScript Object Notation. A text-based file format for transmitting data. Originally created for Java script, but now many programming languages can generate and parse JSON-format data. In many cases, JSON can be used instead XML, but is simpler and easier to read. JSON filenames use the extension .json.

REST: Representational State Transfer. An architectural style for designing networked applications that relies on a stateless, client-server communications protocol, almost always HTTP. Software using this architectural style are called RESTful. Server objects are treated as resources that can be created or destroyed. These server objects are often in a database, but for our purposes are items that can be accessed through a computer’s management interface.

Redfish
Redfish is an Industry Standard for IT Infrastructure. Redfish is referred to as a RESTful API, which means that Redfish uses REST’s architectural style for networked applications. Redfish put data in JSON format and uses HTTPS to communicate. Redfish was designed as a replacement for IPMI and can support multiple nodes. 
 
REST, and therefore Redfish, use these HTTP Methods:
GET: Retrieve data
POST: submit data for processing
PUT: Update a resource
DELETE: delete a resource
HEAD: Same as get but does not return a body
OPTIONS: Returns the supported HTTP methods
PATCH: Update partial resources

Python and Redfish
Several libraries are imported into Python to make use of Redfish easy.

First is json, which allows Python to read the output and convert it into a data structure called a dict or dictionary. This data structure is called an array in other languages. 

Also necessary is urllib, which allows Python to communicate using HTTP.

For HP ILO, use the ilorest library.
 
Suggestions for Future Learning
Some documentation on urllib:
Some documentation on using Python’s json library:
A good tutorial on Python dictionaries can be found in: 
  • Learn Python the Hard Way by Zed A. Shaw.
An excellent tutorial on how to use Python with Redfish can be found on GitHub:
HP has some good documentation on the ilorest library: