You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Redfish clients are numerous and varied. For development and troubleshooting, the <ahref="https://www.postman.com/"target="_blank">Postman API platform</a> is very popular. For one-off actions or “quick and dirty” scripts, <ahref="https://curl.se/"target="_blank">cURL</a>, PowerShell, Python or even <ahref="https://github.com/HewlettPackard/python-redfish-utility/releases/latest"target="blank">HPE iLOrest</a> do the trick. For more sophisticated client programs, you can use an <ahref="https://galaxy.ansible.com/ui/repo/published/hpe/ilo/"target="_blank">Ansible playbook library</a>, Chef or Go and its <ahref="https://pkg.go.dev/github.com/stmcginnis/gofish/redfish"target="_blank">Go-Redfish library</a>.
39
39
@@ -56,27 +56,27 @@ The Redfish protocol specification is published in DMTF document <a href="https:
56
56
57
57

58
58
59
-
_<figcaption>Figure2: The error contains a success message !</figcaption>_
59
+
*<figcaption>Figure2: The error contains a success message !</figcaption>*
60
60
61
61
#### Data model
62
62
63
63
Responses to Redfish requests consist of JSON packets containing key/value properties defined by the DMTF in a schema file. The name of the schema file describing responses is contained in the `@odata.type` property that must be present in each response.
64
64
65
-
For example, the schema defining the root of the Redfish tree is `#ServiceRoot`. Its full name returned by `curl -sk https://bmc-ip/redfish/v1 | jq '."@odata.type"'` is: `#ServiceRoot.v1_13_0.ServiceRoot`. Appended to the `#ServiceRoot` fragment, a version number (`1_13_0`) and then a subtype that, in this specific case, is identical to the main schema. All schemas are publicly available on the <ahref="at https://redfish.dmtf.org/schemas"target="_blank">DMTF website</a> and, are sometimes included in the service itself (see the [Self Describing Model](#self-describing-model) paragraph below). Note that schema versions can evolve independently of each other.
65
+
For example, the schema defining the root of the Redfish tree is `#ServiceRoot`. Its full name returned by `curl -sk https://bmc-ip/redfish/v1 | jq '."@odata.type"'` is: `#ServiceRoot.v1_13_0.ServiceRoot`. Appended to the `#ServiceRoot` fragment, a version number (`1_13_0`) and then a subtype that, in this specific case, is identical to the main schema. All schemas are publicly available on the <ahref="at https://redfish.dmtf.org/schemas"target="_blank">DMTF website</a> and, are sometimes included in the service itself (refer to the [Self Describing Model](#self-describing-model) paragraph below). Note that schema versions can evolve independently of each other.
66
66
67
67
With a close look to the Redfish root diagram in (Figure 3), you will notice the presence of endpoints allowing access to the modeling of the server subsystems. For example, the `Chassis{}` object points to `/redfish/v1/Chassis`, which contains the exhaustive collection of URIs (`./{ChassisId}`) modeling the different chassis constituting the server (racks, blades, enclosures, storage enclosures, etc.).
Computer makers are able to model proprietary properties (not standardized), which constitutes added value compared to the competition. For example, HPE iLO can store firmware updates before deploying them to their respective components. This specificity is described in the proprietary schema `#HpeiLOUpdateServiceExt` present in the `Oem.Hpe{}` object under the URI `/redfish/v1/UpdateService` (Figure 4).
Another example: An HPE ProLiant server containing a storage enclosure connected to a (“modern”) storage controller is represented by two members in the chassis collection; a member pointing to the chassis containing the motherboard of the server (`/redfish/v1/Chassis/1`) and a member pointing to the backplane of the storage enclosure (`/redfish/v1/Chassis/DE040000`).
92
92
93
93
Each member of the collection is an endpoint for accessing the member properties. Links to related resources constitute transversal access to other subsystems. For example, the storage chassis in Figure 6 contains a cross-link to the storage device under the "Systems" tree (`/redfish/v1/Systems/1/Storage/DE040000`).
@@ -110,13 +110,13 @@ Figure 7 is extracted from a BIOS registry that has the effect of prohibiting th
110
110
111
111

112
112
113
-
_<figcaption>Figure 7: Example of inter-dependency in BIOS registry</figcaption>_
113
+
*<figcaption>Figure 7: Example of inter-dependency in BIOS registry</figcaption>*
114
114
115
115
Figure 8 is taken from the base message registry. It shows the modeling of the “Access prohibited” message with the name of the prohibited resource as an argument (%1).
116
116
117
117

118
118
119
-
_<figcaption>Figure 8: Modeling an error message with an argument</figcaption>_
119
+
*<figcaption>Figure 8: Modeling an error message with an argument</figcaption>*
120
120
121
121
## Self-describing model
122
122
@@ -137,19 +137,23 @@ These URIs contain links to all schemas and registries used by the service. They
137
137
138
138
The Redfish protocol requires GET request responses to contain the `Allow` header indicating the possible operations on the URI. Figure 9 shows that the URI `/redfish/v1/Chassis/{ChassisId}` allows GET, HEAD, and PATCH operations against this URI.
139
139
140
-

140
+
After verification, the client code can change (PATCH) the properties marked as `ReadOnly=False` in the schema. The main server chassis in Figure 9 shows the PATCH method and the `IndicatorLED` property can be modified (Figure 10), so one should be able to turn on the small blue LED on this chassis to better identify it in the data center. A good programmer will perform all of these checks before sending their changes. The bad programmer will not perform any checks and will leave the end user to deal with the error(s) returned by the service!
141
141
142
-
_<figcaption>Figure 9: Possible operations on the URI</figcaption>_
142
+
### Link to schema
143
143
144
-
After verification, the client code can change (PATCH) the properties marked as `ReadOnly=False` in the schema. The main server chassis in Figure 9 shows the PATCH method and the `IndicatorLED` property can be modified (Figure 10), so one should be able to turn on the small blue LED on this chassis to better identify it in the data center. A good programmer will perform all of these checks before sending their changes. The bad programmer will not perform any checks and will leave the end user to deal with the error(s) returned by the service!
144
+
To help client programmers to verify programmatically property descriptions, the protocol imposes a header `Link` in responses, pointing to the concerned schema file, as shown in Figure 9. With such a link, clients don't have to browse the schema and the registry stores mentioned above; they just have to follow the provided link.
145
+
146
+

147
+
148
+
*<figcaption>Figure 9: Possible operations on the URI and link to schema</figcaption>*
145
149
146
150
### Deprecated resources
147
151
148
152
Over time, certain properties are deprecated. This information is mentioned in the schemas. Thus, clients receiving a “property not found” response will be able to consult the schema and check if by chance this property has not been deprecated. This type of verification will avoid comments from the programmer like "I don’t understand, it worked before!". But before what? Figure 10 shows an excerpt from the `#Chassis` schema, version 1.22.0, stating that the `IndicatorLED` property has been deprecated in version 1.14.0.
0 commit comments