Skip to content

Commit b82d0bd

Browse files
authored
Merge pull request #1999 from hpe-dev-incubator/cms/blog/hpe-firmware-updates-part-3-the-redfish-update-service
Update Blog “hpe-firmware-updates-part-3-the-redfish-update-service” Updated with links toward new Redocly doc portal
2 parents 26d06d2 + 7d952c2 commit b82d0bd

File tree

4 files changed

+14
-19
lines changed

4 files changed

+14
-19
lines changed

content/blog/hpe-firmware-updates-part-3-the-redfish-update-service.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ tags:
1212
- ilo-restful-api
1313
- update
1414
---
15+
### Updated: July 25, 2023
16+
1517
# Introduction
1618

1719
In the first two blogs of this three part series regarding HPE firmware updates, I explained the [different objects](/blog/hpe-firmware-updates-part-1-file-types-and-smart-components) involved in firmware updates and how they are packaged, as well as the interaction between these objects when used in different [operating modes](/blog/hpe-firmware-updates-part-2-interaction-in-operating-modes).
@@ -21,6 +23,7 @@ This third article describes the standard Redfish® update service, including it
2123
For didactic reasons, cases described in this blog post have been performed with the [Postman](https://www.postman.com/) platform for API development with hard-coded resource locations. Writing Redfish scripts with hard-coded locations is definitively a bad practice as explained in this [article](/blog/getting-started-with-ilo-restful-api-redfish-api-conformance) and demonstrated in these [Jupyter Notebooks](https://github.com/HewlettPackard/hpe-notebooks/tree/master/Redfish). “Well written” public examples in [Python](https://github.com/HewlettPackard/python-ilorest-library/tree/master/examples/Redfish) and [PowerShell](https://www.powershellgallery.com/packages/HPRESTCmdlets/1.2.0.0) can be found on the Internet.
2224

2325
# The Redfish update service
26+
2427
The Redfish update service contains software and firmware information as well as methods for updating these resources. Located at `/redfish/v1/UpdateService`, this [ServiceRoot](https://redfish.dmtf.org/schemas/v1/ServiceRoot.yaml) resource is populated with five endpoints, which are highlighted in the next screenshot. Note that this picture shows the output of a request performed against an iLO 5 (version 2.18) implementing [schema version 1.1.1](https://redfish.dmtf.org/schemas/v1/UpdateService.v1_1_1.yaml) of the Redfish update service. Later schemas may have different content.
2528

2629
In this article, I will cover these five endpoints in the following order: `SoftwareInventory`, `FirmwareInventory`, `Actions`, `HttpPushUri` and finally the `Oem.Hpe` extension.
@@ -45,7 +48,6 @@ To avoid issuing multiple GET requests for retrieving the details of each instal
4548

4649
<img src="https://redfish-lab.sourceforge.io/media/redfish-wiki/FirmwareUpdates-Part3-TheRedfishUpdateService/4_ExpandedSoftwareInventory.png" alt="Expanded Software Inventory" />
4750

48-
4951
A Python example for fetching the software inventory of a server without hard coding its location can be found in the [HPE Python iLOrest library](https://github.com/HewlettPackard/python-ilorest-library/blob/master/examples/Redfish/software_firmware_inventory.py) on GitHub.
5052

5153
# Firmware inventory
@@ -54,7 +56,6 @@ Similar to the `SoftwareInventory` resource, the `FirmwareInventory` endpoint co
5456

5557
<img src="https://redfish-lab.sourceforge.io/media/redfish-wiki/FirmwareUpdates-Part3-TheRedfishUpdateService/5_ExpandedFirmwareCollection.png" alt="Expanded Firmware Collection" />
5658

57-
5859
A Python example to retrieve the firmware inventory of a server (using Redfish) can be found in the [HPE Python iLOrest library](https://github.com/HewlettPackard/python-ilorest-library/blob/master/examples/Redfish/software_firmware_inventory.py) on GitHub.
5960

6061
# Actions
@@ -68,42 +69,37 @@ The implementation of the `SimpleUpdate` used for the writing of this article al
6869
<img src="https://redfish-lab.sourceforge.io/media/redfish-wiki/FirmwareUpdates-Part3-TheRedfishUpdateService/6_SimpleUpdateAction.png" alt="Simple Update Action" />
6970
<img src="https://redfish-lab.sourceforge.io/media/redfish-wiki/FirmwareUpdates-Part3-TheRedfishUpdateService/7_SimpleUpdateActionWithTransferProtocol.png" alt="Simple Update Action With Transfer Protocol" />
7071

71-
7272
You can monitor the update process by polling the `State` and `FlashProgressPercent` properties part of the `Oem.Hpe` section as shown in the following screenshot.
7373

7474
<img src="https://redfish-lab.sourceforge.io/media/redfish-wiki/FirmwareUpdates-Part3-TheRedfishUpdateService/8_SimpleUpdateFlashPercent.png" alt="SimpleUpdateFlashPercent" />
7575

76+
Refer to the [HPE API Reference document](https://servermanagementportal.ext.hpe.com/docs/redfishservices/ilos/ilo6/ilo6_145/ilo6_other_resourcedefns145/#oemhpestate) for the exhaustive list of possible states.
7677

77-
Refer to the [HPE API Reference document](https://hewlettpackard.github.io/ilo-rest-api-docs/ilo5/#oem-hpe-state) for the exhaustive list of possible states.
78-
79-
<img src="https://redfish-lab.sourceforge.io/media/redfish-wiki/FirmwareUpdates-Part3-TheRedfishUpdateService/9_OemHpeStates.png" alt="OemHpeStates" />
80-
78+
![OemHpeStates](/img/9_oemhpestates.png)
8179

8280
With iLO 5 firmware 2.30 and higher versions, a successful `SimpleUpdate` returns two pointers in the Task Service: a task location and a task monitor location. The task location `(/redfish/v1/TaskService/Tasks/22` in the next picture) contains the details of the update and the task monitor location (`/redfish/v1/TaskService/TaskMonitors/22`) contains the status of the task at the time of the query.
83-
81+
8482
The following two pictures show, respectively, the response of a successful `SimpleUpdate` and the task monitor details including a running task state. Note that the accomplished percentage of the task is not present in the Task Monitor location. It is only mentioned in the `Oem.Hpe` extension properties, as mentioned above.
8583

8684
<img src="https://redfish-lab.sourceforge.io/media/redfish-wiki/FirmwareUpdates-Part3-TheRedfishUpdateService/10_SuccessfulSimpleUpdate.png" alt="SuccessfulSimpleUpdate" />
8785
<img src="https://redfish-lab.sourceforge.io/media/redfish-wiki/FirmwareUpdates-Part3-TheRedfishUpdateService/11_TaskMonitorDetails.png" alt="TaskMonitorDetails" />
8886

87+
The list of all possible values of the `TaskState` key is found in the [HPE API Reference document](https://servermanagementportal.ext.hpe.com/docs/redfishservices/ilos/ilo6/ilo6_145/ilo6_other_resourcedefns145/#taskstate).
8988

90-
The list of all possible values of the `TaskState` key is found in the [HPE API Reference document](https://hewlettpackard.github.io/ilo-rest-api-docs/ilo5/#taskstate).
91-
92-
<img src="https://redfish-lab.sourceforge.io/media/redfish-wiki/FirmwareUpdates-Part3-TheRedfishUpdateService/12_TaskStates.png" alt="TaskStates" />
89+
![TaskStates](/img/12_taskstates.png)
9390

9491
**Important note:** Only iLO binaries (`.bin`) and UEFI/Bios binaries (`.signed.flash`) can be processed with the `SimpleUpdate` action. If you supply a Smart Component or a firmware package (`.fwpkg`), the response to the POST request will contain a successful return code (`200 OK`). However, the flash operation will never occur and an error record will be posted in the iLO event log, as shown in the following image.
9592

9693
<img src="https://redfish-lab.sourceforge.io/media/redfish-wiki/FirmwareUpdates-Part3-TheRedfishUpdateService/13_aiLOEventLog.png" alt="iLOEventLog" />
9794

9895
The iLO log record can be retrieved from the `Oem.Hpe` extension of the update service, as shown below.
9996

100-
10197
<img src="https://redfish-lab.sourceforge.io/media/redfish-wiki/FirmwareUpdates-Part3-TheRedfishUpdateService/14_SimpleUpdateInvalidFormat.png" alt="TheRedfishUpdateService" />
10298

10399
## Scripting a SimpleUpdate
104100

105101
There are several possibilities to script a `SimpleUpdate` action. Here are some of them.
106-
102+
107103
The [HPE iLOrest](http://hpe.com/info/resttool) utility provides the `firmwareupdate` macro command. The command expects the URI of the binary firmware image to flash. The sources of this macro command is public and published on [GitHub](https://github.com/HewlettPackard/python-redfish-utility/tree/master/src/extensions/iLO%20COMMANDS).
108104

109105
<img src="https://redfish-lab.sourceforge.io/media/redfish-wiki/FirmwareUpdates-Part3-TheRedfishUpdateService/15_IlorestFirmwareUpdate.png" alt="IlorestFirmwareUpdate" />
@@ -113,7 +109,7 @@ A simple Python script updating an iLO 5 firmware is published in the [HPE Pytho
113109
# HTTP Push Update
114110

115111
The HTTP Push Update endpoint (`HttpPushUri`) allows you to embed a firmware update component in the body of a request and push it to a server. As its name suggests, it is a “push” update method in contrast to “pull” methods that I just described with `SimpleUpdate`.
116-
112+
117113
The update service schema [version 1.8.1](http://redfish.dmtf.org/schemas/v1/UpdateService.v1_8_1.json) provides the following description of the `HttpPushUri` property: “*The URI used to perform an HTTP or HTTPS push update to the update service. The format of the message is vendor-specific.*
118114

119115
To overcome the loose definition of the `HttpPushURI`, Redfish introduced the `MultipartHttpPushUri` method in version [1.6.0](http://redfish.dmtf.org/schemas/v1/UpdateService.v1_6_0.json) of the Update Service schema (not yet implemented in the server used for writing this article).
@@ -126,7 +122,7 @@ The payload of a POST request to the `HttpPushURI` (see first picture below) is
126122

127123
The flexibility of the Redfish standard offers the possibility for computer makers to extend it with properties not present in the standard or proprietary added-value features. HPE has a unique way of managing firmware through the iLO Repository that can only be leveraged by Redfish in its `Oem.Hpe` extension.
128124

129-
The iLO Repository is a persistent storage area for update components. To trigger the installation of a single component or a group of components (install set) already present in the iLO Repository, you just need to add its name to the Installation Queue. Components in this queue are processed according to their specificities and nature. Refer to [Part 1](/blog/hpe-firmware-updates-part-1-file-types-and-smart-components) and [Part 2](/blog/hpe-firmware-updates-part-2-interaction-in-operating-modes) of this blog series for component description and to the [HPE API Reference document](https://hewlettpackard.github.io/ilo-rest-api-docs/ilo5/#software-and-firmware-management-flow) for a detailed flow of operations.
125+
The iLO Repository is a persistent storage area for update components. To trigger the installation of a single component or a group of components (install set) already present in the iLO Repository, you just need to add its name to the Installation Queue. Components in this queue are processed according to their specificities and nature. Refer to [Part 1](/blog/hpe-firmware-updates-part-1-file-types-and-smart-components) and [Part 2](/blog/hpe-firmware-updates-part-2-interaction-in-operating-modes) of this blog series for component description and to the [HPE API Reference document](https://servermanagementportal.ext.hpe.com/docs/redfishservices/ilos/supplementdocuments/updateservice/#software-and-firmware-management-flow) for a detailed flow of operations.
130126

131127
The update service `Oem.Hpe` extension is a pull update service like the `SimpleUpdate` service described earlier. However, it is not limited to instant flash of binary firmware files. It provides all the necessary operations to fully manage the iLO 5 update subsystem.
132128

@@ -196,14 +192,13 @@ You can add the name of a component present in the iLO Repository into the Insta
196192

197193
The following screenshot shows the addition of component cp040154.exe in the Installation Queue with three properties: `Name`, `Filename` and `Command`. The `Name` property is not required, but it is interesting to provide as it appears as a description in the Installation Queue listing. The `Filename` property contains the component file name visible in the iLO Repository. Thus, this property is required. The `Command` property is required as well, as it describes the action to take by the Installation Queue subsystem.
198194

199-
200195
Smart Components embed all necessary [meta-data](/blog/hpe-firmware-updates-part-1-file-types-and-smart-components) information to process their installation. Hence, no other property is required in the request to better qualify the deployment process.
201196

202197
<img src="https://redfish-lab.sourceforge.io/media/redfish-wiki/FirmwareUpdates-Part3-TheRedfishUpdateService/26_AddScToQueue.png" alt="AddScToQueue" />
203198

204-
The list of `Command` possible values can be found in the [HPE API RESTful Reference Document](https://hewlettpackard.github.io/ilo-rest-api-docs/ilo5/#command).
199+
The list of `Command` possible values can be found in the [HPE API RESTful Reference Document](https://servermanagementportal.ext.hpe.com/docs/redfishservices/ilos/ilo6/ilo6_145/ilo6_hpe_resourcedefns145/#command).
205200

206-
<img src="https://redfish-lab.sourceforge.io/media/redfish-wiki/FirmwareUpdates-Part3-TheRedfishUpdateService/27_CommandValues.png" alt="CommandValues" />
201+
![CommandValues](/img/27_commandvalues.png)
207202

208203
The body response of a component addition in the Installation Queue contains the URI of this new item in the list, as well as many other details. This URI can be used later to review the details or to delete the component from the queue, as explained in the next paragraph.
209204

@@ -280,7 +275,7 @@ You can create an install Set with a POST request to the install set end point m
280275

281276
<img src="https://redfish-lab.sourceforge.io/media/redfish-wiki/FirmwareUpdates-Part3-TheRedfishUpdateService/39_InstallSetCreation.png" alt="InstallSetCreation" />
282277

283-
In the response of a successful install set creation you will get its` Id, `which can be used to view its details, modify it or delete it.
278+
In the response of a successful install set creation you will get its`Id,`which can be used to view its details, modify it or delete it.
284279

285280
### Install set modification
286281

static/img/12_taskstates.png

59.6 KB
Loading

static/img/27_commandvalues.png

47.7 KB
Loading

static/img/9_oemhpestates.png

59.4 KB
Loading

0 commit comments

Comments
 (0)