mei
Minnow
Posts: 4
|
Post by mei on Aug 16, 2022 4:01:17 GMT
Hello,
I would like to know if below implementation is valid. Could you please help to figure it out? Thanks.
We have a OEM action like below:
"Actions": {
"Oem": {
"#xxx.xxx": {
"@redfish.ActionInfo": "/redfish/v1/xxx/xxx",
"target": "/redfish/v1/Systems/system/xxx.Create"
} }
}
We request user must use get method to access "/redfish/v1/xxx/xxx" URI(It will refresh some data when we access this URI) before taking this action(/redfish/v1/Systems/system/xxx.Create). If not, the action will be failure. Is it OK to do like this? because I understand @redfish.ActionInfo is an annotation, it is used for user to check the valid parameter instead of counting on access this URI.
BR, Mei
|
|
|
Post by mraineri on Aug 16, 2022 12:59:42 GMT
That would not be seen as correct behavior. Clients only inspect ActionInfo when they need to dynamically discover supported parameters and values. While the supported parameters and values could change over time based on the state of the system, clients may still have enough info on their side to know what's allowable for the action.
|
|
fish
Guppy
Posts: 65
|
Post by fish on Aug 26, 2022 12:06:00 GMT
Hi, Please also notice format of Oem action URI to use, like for "target" property in example above. Text from specification chapter 9.8.8 "OEM actions" below: "The URI of the OEM action in the target property shall be in the form: <ResourceUri>/Actions/Oem/<ResourceType>.<Action> ..." BR /Magnus
|
|
|
Post by shawnw on Oct 11, 2023 8:42:45 GMT
Hi,
Could I ask the URI format of the ActionInfo Annotation?
For example, if these actions has @redfish.ActionInfo for the parameter details, would it look like this?
{ "Actions": { "Oem": { "#Contoso_ComputerSystem.Ping": { "@redfish.ActionInfo": "redfish/v1/Systems/1/Actions/Oem/Contoso/PingActionInfo", "target": "/redfish/v1/Systems/1/Actions/Oem/Contoso_ComputerSystem.Ping" } } } }
|
|
|
Post by mraineri on Oct 11, 2023 13:30:29 GMT
Yes, that usage is a good example for the URI for that action info. It keeps "Oem" and "Contoso" as their own URI segments (much like OEM resources), and ends with <ActionName>ActionInfo to make the usage clear.
|
|
|
Post by shawnw on Oct 11, 2023 14:58:02 GMT
Thanks!
I couldn’t find the rule for the OEM action info URI, so I want to make sure it'll be `Actions/Oem/<OemIdentif>/<ActionName>ActionInfo`. Yea! It's clearer that it's for an OEM action info as a subordinate of Actions.
Thanks again!
|
|
|
Post by shawnw on Oct 12, 2023 6:44:08 GMT
Yes, that usage is a good example for the URI for that action info. It keeps "Oem" and "Contoso" as their own URI segments (much like OEM resources), and ends with <ActionName>ActionInfo to make the usage clear. mraineriSorry need to get your comfirmation to do the right thing. You mentioned it's good to keep "Oem" and "<OemIdentify>" as their own URI segments. But is it necessary to be the subordinate of "Actions"? I think it might be good to distinguish that the URI is for an action. However, I don't find any statements from the documents, or maybe I missed it. Could you help to clearify about this? "redfish/v1/Systems/1/ Actions/Oem/Contoso/PingActionInfo" or "redfish/v1/Systems/1/Oem/Contoso/PingActionInfo" Many Thanks, Shawn
|
|
|
Post by mraineri on Oct 12, 2023 13:00:55 GMT
Yes, it would be good to use "Actions" as a URI segment too. Part of our URI best practices is to include the property hierarchy involved with how the link is nested in the resource. This helps minimize the chance of URI collisions for other links.
|
|