Post by ginugeorge on Jun 11, 2021 12:14:58 GMT
I am having a clarification related to POST Actions URI across the Redfish Stack.
Consider that under the Systems Boot Certificates Collection, we have one instance , named "1".
Based on the DMTF Spec and our understanding, we are throwing the status codes as mentioned below in case of Valid and Invalid POST Actions :
1. Valid POST Actions(Certificate.Renew, Certificate.Rekey) to Non Existent Instances
{{http_protocol}}://{{ip}}/redfish/v1/Systems/Self/Boot/Certificates/2/Actions/Certificate.Renew
should return 404 Not Found
2. Valid POST Actions(Certificate.Renew, Certificate.Rekey) to Existent Instances
for e.g. {{http_protocol}}://{{ip}}/redfish/v1/Systems/Self/Boot/Certificates/1/Actions/Certificate.Renew
should return 200 OK for Success and 400 Bad Request in case of Failure.
3. Invalid POST Actions(for e.g. Certificate.Renew1, Certificate.Rekey1) to Non Existent Instances
{{http_protocol}}://{{ip}}/redfish/v1/Systems/Self/Boot/Certificates/2/Actions/Certificate.Renew1
should return 404 Not Found
4. Invalid POST Actions(for e.g. Certificate.Renew1, Certificate.Rekey1) to Existent Instances
{{http_protocol}}://{{ip}}/redfish/v1/Systems/Self/Boot/Certificates/1/Actions/Certificate.Renew1
should return 400 Bad Request
Please let us know if we need to revisit any of the scenarios and modify the status codes.
Consider that under the Systems Boot Certificates Collection, we have one instance , named "1".
{{http_protocol}}://{{ip}}/redfish/v1/Systems/Self/Boot/Certificates
{
"@odata.context": "/redfish/v1/$metadata#CertificateCollection.CertificateCollection",
"@odata.etag": "\"1623409343\"",
"@odata.id": "/redfish/v1/Systems/Self/Boot/Certificates",
"@odata.type": "#CertificateCollection.CertificateCollection",
"Description": "Collection of Certificates",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/Self/Boot/Certificates/1"
}
],
"Members@odata.count": 1,
"Name": "Certificate Collection"
}
Based on the DMTF Spec and our understanding, we are throwing the status codes as mentioned below in case of Valid and Invalid POST Actions :
1. Valid POST Actions(Certificate.Renew, Certificate.Rekey) to Non Existent Instances
{{http_protocol}}://{{ip}}/redfish/v1/Systems/Self/Boot/Certificates/2/Actions/Certificate.Renew
should return 404 Not Found
2. Valid POST Actions(Certificate.Renew, Certificate.Rekey) to Existent Instances
for e.g. {{http_protocol}}://{{ip}}/redfish/v1/Systems/Self/Boot/Certificates/1/Actions/Certificate.Renew
should return 200 OK for Success and 400 Bad Request in case of Failure.
3. Invalid POST Actions(for e.g. Certificate.Renew1, Certificate.Rekey1) to Non Existent Instances
{{http_protocol}}://{{ip}}/redfish/v1/Systems/Self/Boot/Certificates/2/Actions/Certificate.Renew1
should return 404 Not Found
4. Invalid POST Actions(for e.g. Certificate.Renew1, Certificate.Rekey1) to Existent Instances
{{http_protocol}}://{{ip}}/redfish/v1/Systems/Self/Boot/Certificates/1/Actions/Certificate.Renew1
should return 400 Bad Request
Please let us know if we need to revisit any of the scenarios and modify the status codes.