|
Post by malbolge on Apr 7, 2023 13:56:48 GMT
Suppose we have a Redfish device that supports PropertyNotWritable annotations. This annotation indicates that a property was given a value in the request body, but the property is a readonly property. How should a Redfish system decide to annotate responses? The most obvious way is simply - if a property is not writeable, add the annotation.
This makes sense for a PATCH, where the user specfies what they want to change.
The issue is with PUT, which feeds the entire Resource back into the Redfish device. All the generic stuff like Name, Description, @odata.type, @odata.id - most boilerplate fields are RO. This would mean that for a PUT, a Redfish device would respond with a particularly voluminous blob of annotations for each of these RO properties.
Since the schema specifically limits the number of arguments to no more and no less than 1 "NumberOfArgs": 1, Each RO property must necessarily have their own annotation.
Is this the intended operation of PUTting a Resource with annotations?
|
|
|
Post by jautor on Apr 7, 2023 16:17:31 GMT
The PropertyNotWritable message is intended for reporting properties that are defined as read-write in schema have been implemented as read-only. And that message is really only needed if the operation fails, or if the service needs to explain that while an operation suceeded, it didn't incorporate one or more properties.
But PUT usage is not common for public-facing clients (and not required by the specification). I would expect that any PUT support is likely from an internal-side data provider which doesn't adhere to the RO/RW definitions anyway.
The specification also allows the service to simply ignore/discard RO properties provided in a data modification request. That is to allow for a read-modify-write of a Redfish resource without requiring the client to remove data from a previously gathered/stored response payload.
Jeff
|
|
|
Post by malbolge on Apr 11, 2023 10:28:58 GMT
The PropertyNotWritable message is intended for reporting properties that are defined as read-write in schema have been implemented as read-only. And that message is really only needed if the operation fails, or if the service needs to explain that while an operation suceeded, it didn't incorporate one or more properties. But PUT usage is not common for public-facing clients (and not required by the specification). I would expect that any PUT support is likely from an internal-side data provider which doesn't adhere to the RO/RW definitions anyway. The specification also allows the service to simply ignore/discard RO properties provided in a data modification request. That is to allow for a read-modify-write of a Redfish resource without requiring the client to remove data from a previously gathered/stored response payload. Jeff Thanks, that helps a bit. So to formalize what you said: 1) There is no difference in behavior in terms of the PropertyNotWritable annotation between a PUT and PATCH operation. If a PATCH operation contains in it's payload the entire Resource, that is, contains the same data as a PUT would, it will result in the same PropertyNotWriteable annotations. 2) A Redfish device shall annotate with PropertyNotWritable every attempt to write a property that is read-only in it's implementation but read-write in the schema 3) A Redfish device may, but shouldn't annotate any attempt to write a property defined as read-only in the schema. Is this correct? By the way, the BMC implementations I am familiar with give the user the option to select either PUT or PATCH.
|
|