Skip to content

Commit 7945948

Browse files
authored
Merge pull request #2373 from hpe-dev-incubator/cms/blog/setting-bios-and-storage-controller-properties-with-redfish
Update Blog “setting-bios-and-storage-controller-properties-with-redfish”
2 parents 0798f27 + 326c809 commit 7945948

12 files changed

+24
-22
lines changed
Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Setting Bios and Storage Controller Properties with Redfish
2+
title: Setting Bios and Storage Controller Properties with Redfish®
33
date: 2018-07-19T15:11:44.185Z
44
featuredBlog: false
55
priority: null
66
author: Francois Donze
7-
authorimage: /img/blogs/Avatar5.svg
7+
authorimage: /img/fdz-photoprofile.png
88
thumbnailimage: null
99
tags:
1010
- ilo-restful-api
@@ -13,19 +13,21 @@ tags:
1313
- Bios
1414
- Postman
1515
---
16-
Updated July 26, 2023
16+
<style> li { font-size: 27px; line-height: 33px; max-width: none; } </style>
1717

18-
The concept of deferred / pending settings in the [Bios]( https://servermanagementportal.ext.hpe.com/docs/concepts/biosdatamodel/#bios-current-and-pending-areas) and `SmartStorageConfig` subsystems of HPE iLO 5 is briefly presented in the [HPE Reference API](https://servermanagementportal.ext.hpe.com/) documentation. With two examples, this document illustrates what is happening when properties are modified in those subsystems using the Redfish REST API against HPE servers.
18+
Updated March 5, 2024
1919

20-
**NOTE**: The `SmartStorageConfig` [data type](https://servermanagementportal.ext.hpe.com/docs/concepts/datatypesandcollections/) is [deprecated in HPE iLO 6](https://servermanagementportal.ext.hpe.com/docs/redfishservices/ilos/ilo6/ilo6_adaptation/#hpe-smart-storage-model-oem-deprecated) based servers.
20+
The concept of deferred / pending settings in the <a href="https://servermanagementportal.ext.hpe.com/docs/concepts/biosdatamodel/#bios-current-and-pending-areas" target="_blank">Bios</a> and `SmartStorageConfig` subsystems of HPE iLO 5 is briefly presented in the <a href="https://servermanagementportal.ext.hpe.com/" target="_blank">HPE Reference API</a> documentation. With two examples, this document illustrates what is happening when properties are modified in those subsystems using the Redfish REST API against HPE servers.
2121

22-
**NOTE**: The latest versions of iLO 5 firmware support both the HPE `SmartStorageConfig` and the DMTF standard storage models. Volume management with controllers implementing the DMTF storage model is described in the [HPE server management portal](https://servermanagementportal.ext.hpe.com/docs/redfishservices/ilos/supplementdocuments/storage/).
22+
**NOTE**: The `SmartStorageConfig` <a href="https://servermanagementportal.ext.hpe.com/docs/concepts/datatypesandcollections/" target="_blank">data type</a> is <a href="https://servermanagementportal.ext.hpe.com/docs/redfishservices/ilos/ilo6/ilo6_adaptation/#hpe-smart-storage-model-oem-deprecated" target="_blank">deprecated in HPE iLO 6</a> based servers.
2323

24-
We assume that the reader is familiar with REST APIs in general and Redfish in particular. A good entry point for developers to grasp the power of Redfish is the [iLO RESTful API Ecosystem](https://www.hpe.com/us/en/servers/restful-api.html#).
24+
**NOTE**: The latest versions of iLO 5 firmware support both the HPE `SmartStorageConfig` and the DMTF standard storage models. Volume management with controllers implementing the DMTF storage model is described in the <a href="https://servermanagementportal.ext.hpe.com/docs/redfishservices/ilos/supplementdocuments/storage/" target="_blank">HPE server management portal</a>.
25+
26+
We assume that the reader is familiar with REST APIs in general and Redfish in particular. A good entry point for developers to grasp the power of Redfish is the <a href="https://www.hpe.com/us/en/servers/restful-api.html#" target="_blank">iLO RESTful API Ecosystem</a>.
2527

2628
## Foreword
2729

28-
For didactic purposes, we use direct URIs to targets instead of crawling the Redfish tree to discover the target URIs, as explained in the [Getting Started with the Redfish(c) API Part 2](/blog/getting-started-with-the-redfish-api-part-2) document.
30+
For didactic purposes, we use direct URIs to targets instead of crawling the Redfish tree to discover the target URIs, as explained in the <a href="https://developer.hpe.com/blog/getting-started-with-the-redfish-api-part-2/" target="_blank">Getting Started with the Redfish® API Part 2</a> blog post.
2931

3032
In the following paragraphs, `{{Subsystem-URI}}` refers to an URI like `https://<ilo-IP>/redfish/v1/<subsystem>/` where `<subsystem>` represents either `Bios` or `SmartStorageConfig`. These subsystems contains the currently used properties.
3133

@@ -34,9 +36,7 @@ Each of them has a pending sub-zone called `Settings/` and explained in the next
3436
## Deferred / pending high level concept description
3537

3638
1. Modifications in these subsystems are performed using HTTP `PATCH` or HTTP `PUT` against `{{Subsystem-URI}}/`**`Settings/`**.
37-
3839
2. Upon a successful transaction, the HTTP return code is `200 OK` with the associated message: `One or more properties were changed and will not take effect until the system is reset`.
39-
4040
3. During the next system reset, the content of `{{Subsystem-URI}}/Settings/` is transferred one level up, in `{{Subsystem-URI}}/`. The return status of this transfer is present in `{{Subsystem-URI}}` with an associated message.
4141

4242
The important thing to note in this flow is that the final status code and associated message of a property setting is visible **after the system reset**.
@@ -45,56 +45,58 @@ The important thing to note in this flow is that the final status code and assoc
4545

4646
In this example, we create a Raid1 storage array of two physical disks using Postman. To achieve this goal, we have to issue a `PUT` to `{{iloURI}}/redfish/v1/Systems/1/SmartStorageConfig/Settings/` with a body (aka payload) similar to the example shown below:
4747

48-
![Body to PUT to .../SmartStorageConfig/Settings/](https://redfish-lab.sourceforge.io/media/redfish-wiki/Setting-Bios-and-StorageControllerProperties-with-Redfish/1-PUT-Body.png)
48+
![Body to PUT to .../SmartStorageConfig/Settings/](/img/1-put-body.png "Body to PUT to .../SmartStorageConfig/Settings/")
4949

5050
Upon successful completion of this `PUT` request, the HTTP status return code is `200 OK`, which means that the remote Web server understood what to do with this well-formed payload.
5151

5252
The Body of the HTTP response contains an `error` property with a `SystemResetRequired` message. This property is a Redfish object sent by the Redfish server. It is there to give details about the next step to perform to finish the modification process.
5353

54-
![PUT Return Status](https://redfish-lab.sourceforge.io/media/redfish-wiki/Setting-Bios-and-StorageControllerProperties-with-Redfish/2-PUT-Return-Status.png)
54+
![PUT Return Status](/img/2-put-return-status.png "PUT Return Status")
5555

5656
At this stage of the process, only the staging / "pending zone" of the Smart Array has changed and contains the `PUT` payload. We can verify this assertion by comparing the content of `{{Subsystem-URI}}/Settings/` with the content of `{{Subsystem-URI/}}`.
5757

5858
In the pending zone (`.../SmartStorageConfig/Settings/`) we can see the payload we sent to the Redfish server. However, in the "running zone" (`.../SmartStorageConfig/`) the `LogicalDrives` array is still empty:
5959

60-
![GET Pending and Current LogicalDrives](https://redfish-lab.sourceforge.io/media/redfish-wiki/Setting-Bios-and-StorageControllerProperties-with-Redfish/4-GetPendingLogicalDrives.png)
60+
![GET Pending and Current LogicalDrives](/img/3-getpendinglogicadrives.bmp "GET Pending and Current LogicalDrives")
6161

6262
It is now time to reset the server and perform a `GET` of the running zone. In the response body of this operation, the first Redfish object is a `@Redfish.Settings` collection containing a single `MessageID` mentioning `Success`. This single message is synonym of a successful transfer of the "pending zone" in to the "running zone". We will see later in this document what we get in case of an un-successful transfer.
6363

64-
![GET Running zone after server reset](https://redfish-lab.sourceforge.io/media/redfish-wiki/Setting-Bios-and-StorageControllerProperties-with-Redfish/5-GetAfterReset.png)
64+
![GET Running zone after server reset](/img/5-getafterreset.png "GET Running zone after server reset")
6565

6666
Further down in this response we find the `LogicalDrives` array containing the Raid1 disk array:
6767

68-
![GET LogicalDrives from running zone](https://redfish-lab.sourceforge.io/media/redfish-wiki/Setting-Bios-and-StorageControllerProperties-with-Redfish/6-GetAfterReset-2.png)
68+
![GET LogicalDrives from running zone](/img/6-getafterreset-2.png "GET LogicalDrives from running zone")
6969

7070
## Unsuccessful example
7171

7272
In order to emphasize the fact that the modification status of properties in the `Bios` and `SmartStorage` subsystems must be done after a system reset, we will study a case where the JSON `PUT` payload is syntactically correct but embedding a value typo (`Raid` instead of `Raid1`) and missing a required key-value (`DataGuard=Disabled`):
7373

74-
![PUT of a bad payload](https://redfish-lab.sourceforge.io/media/redfish-wiki/Setting-Bios-and-StorageControllerProperties-with-Redfish/7-BadPayload.png)
74+
![PUT of a bad payload](/img/7-badpayload.png "PUT of a bad payload")
7575

7676
Sending this request returns an HTTP `200 OK` status and a `SystemResetRequired` Redfish message just like in the previous example:
7777

78-
![PUT return status of bad Redfish request](https://redfish-lab.sourceforge.io/media/redfish-wiki/Setting-Bios-and-StorageControllerProperties-with-Redfish/8-PUT-Return-Status-of-Bad-Request.png)
78+
![PUT return status of bad Redfish request](/img/8-put-return-status-of-bad-request.png "PUT return status of bad Redfish request")
7979

8080
The pending zone contains the faulty payload:
8181

82-
![Faulty payload in pending zone](https://redfish-lab.sourceforge.io/media/redfish-wiki/Setting-Bios-and-StorageControllerProperties-with-Redfish/9-PendingZoneWithBadRequest.png)
82+
![Faulty payload in pending zone](/img/9-pendingzonewithbadrequest.png "Faulty payload in pending zone")
8383

8484
After the server reset, a `GET` of the running zone responds with a `MessageArgs=[DataGuard]` object and two `MessageID`keys. The first one mentions `DataGuard` as a missing property and the second one (`Success`) means that the analysis of the transfer from the pending zone to the running zone has successfully ended. This `Success` message does not means that the transfer has occurred.
8585

8686
Moreover, note that there is nothing mentioning the `Raid` typo. It means that analysis of the payload to transfer stops at the first error found.
8787

88-
![DataGuard Property Missing](https://redfish-lab.sourceforge.io/media/redfish-wiki/Setting-Bios-and-StorageControllerProperties-with-Redfish/10-DataGuardPropertyMissing.png)
88+
![DataGuard Property Missing](/img/10-dataguardpropertymissing.png "DataGuard Property Missing")
8989

9090
If we drill down to the `LogicalDrives` array we notice that it is still empty. Hence the transfer did not occur.
9191

92-
![Empty LogicalDrives array](https://redfish-lab.sourceforge.io/media/redfish-wiki/Setting-Bios-and-StorageControllerProperties-with-Redfish/11-EmptyLogicalDrivesArray.png)
92+
![Empty LogicalDrives array](/img/11-emptylogicaldrivesarray.png "Empty LogicalDrives array")
9393

9494
If we `PUT` a new payload with the `DataGuard=Disabled` property but still without correct Raid level and reset the server, we notice an `InvalidRAIDLevel` message explaining the problem.
9595

96-
![Wrong Raid Level error](https://redfish-lab.sourceforge.io/media/redfish-wiki/Setting-Bios-and-StorageControllerProperties-with-Redfish/12-WrongRaidLevel.png)
96+
![Wrong Raid Level error](/img/12-wrongraidlevel.png "Wrong Raid Level error")
9797

9898
## Conclusion
9999

100-
Understanding the pending / deferred process when modifying Bios and SmartStorage properties using the Redfish API as well as the different types of return codes (HTTP, MessageID...) should ease program development and troubleshooting sessions.
100+
Understanding the pending / deferred process when modifying Bios and SmartStorage properties using the Redfish API as well as the different types of return codes (HTTP, MessageID...) should ease program development and troubleshooting sessions.
101+
102+
Don't forget to check out some of my other <a href="https://developer.hpe.com/search/?term=donze" target="_blank">blog posts</a> on the HPE Developer portal to learn more about Redfish tips and tricks.

static/img/1-put-body.png

23.2 KB
Loading
31.6 KB
Loading
9.34 KB
Loading

static/img/12-wrongraidlevel.png

53.2 KB
Loading

static/img/2-put-return-status.png

31.9 KB
Loading
1.14 MB
Binary file not shown.

static/img/5-getafterreset.png

26.9 KB
Loading

static/img/6-getafterreset-2.png

24.5 KB
Loading

static/img/7-badpayload.png

16.3 KB
Loading

0 commit comments

Comments
 (0)