What should be the FW's behavior when receiving RDEOperationInit command that attempts to perform an Action operation but provides a parameter value that the device does not support?
For example the #Port.Reset action contains an optional parameter ResetType which is an enum with many values. The device may support only a subset of the Reset values in which case what will it do when action is requested with a unsupported ResetType value?
My assumption is that the device shall return base PLDM error code ERROR (0x1).
Bases of my assumption: DSP0266 states: "If the action request does not contain all required parameters, the service shall return the HTTP 400 Bad Request status code. If the action request contains unsupported parameters, the service shall ignore the unsupported parameters or return the HTTP 400 Bad Request status code.". DSP0218 contains a mapping of RDE/PLDM errors to HTTP Error Codes. The RDE errors mapped to HTTP error code 400 are: ERROR_OPERATION_FAILED (0x87) and ERROR_UNSUPPORTED (0x89). The PLDM base errors that map to HTTP code 400 is ERROR.
Error code 0x87 isn't a valid CompletionCode for RDEOperationInit and 0x89 description states use for non-supported operation (in our case the operation "Action" is supported) or uninterpretable text format. This leaves only PLDM's ERROR (0x1) as an option for BMC to interpret to HTTP400.
The applicable completion code in this case is ERROR_UNSUPPORTED (0x89). This indicates an operation failure (versus a command failure) which allows the RDE device to optionally return a @message.ExtendedInfo as part of the response to further describe the reason for the operation failure. For example, the RDE device could BEJ encode an ActionParameterNotSupported message from the Redfish Base message registry in the response to the RDEOperationInit command .
Note: The current definition for ERROR_UNSUPPORTED (0x89) below in DSP0218 does not explicitly indicate that this could be use for Actions though it does indicate it could be used for PATCH operations. We should probably enhance the description in the spec to include the Action case as well.
“An attempt was made to initialize an operation not supported by the RDE Device, to write to a property that the RDE Device does not support, or a command was issued containing a text string in a format that the recipient cannot interpret.”