|
Post by andruszamojski on Apr 19, 2022 10:15:29 GMT
I have a case when I would like to limit boolean options depending on specific condition: e.g.: a system operates in specific mode where enabling a property is not allowed. I need to expose this information to GUI implementation which will propose or not a specific option. Accoring to specification AllowableValues is array of strings. Do you know what to do in this case?
|
|
|
Post by mraineri on Apr 20, 2022 1:45:09 GMT
As the standard is currently defined, it's not possible to use the existing AllowableValues term on anything other than strings (or enumerations since those are strings underneath the covers).
This also seems very similar to a case where a standard property is writable per the spec, but a specific service implements it as read-only. Currently there is no method for a client to discover this capability.
|
|
|
Post by jautor on Apr 20, 2022 4:30:19 GMT
You are correct that the "AllowableValues" annotation is only used for string type properties. We don't currently have a method to indicate that a writeable boolean or number property has a restricted set of values. But as one of the design tenets of Redfish is to avoid "try-fail" semantics, we'll discuss this as something that should be added to the specification.
In some cases, though, a "mode" property should indicate that some functionality is unavailable or effectively disabled (e.g. IP Address components when DHCP is in use). In that case, the GUI code would key off of that mode property to indicate that some values or properties are not available.
Jeff
|
|
|
Post by andruszamojski on Apr 20, 2022 16:41:43 GMT
Ok, thank you for explanation.
|
|