|
Post by mharishm on Nov 1, 2021 15:06:56 GMT
Under AccountService there are many patchable properties such as, LDAP properties/ActiveDirectory Properties - Authentication - LDAPService - ServiceAddresses - ServiceEnabled - RemoteRoleMapping
AccountService properties - AccountLockoutCounterResetAfter - AccountLockoutCounterResetEnabled - AccountLockoutDuration - LocalAccountAuth - ServiceEnabled
As per openapi.yml, redfish serivce can respond either 200 or 202 or 204 response for AccounrService PATCH operation.
In our current redfish implementation we are returning 200 as a response while giving PATCH call to AccountService URI.
We got in a situation wherein we are planning to create a task while PATCHing LDAP and AD properties by returning 202.
can redfish implementation return 2 response code(202 or 200) based on the request body?
i.e., If the patch request body has LDAP and ActiveDirectory properties then create a task and return 202 for as the http response. and If the patch request body has AccountService properties alone (like AccountLockoutCounterResetAfter, LocalAccountAuth etc.), directly patch and return 200 without creating a task.
Please let us know your view on this case?
|
|
|
Post by jautor on Nov 1, 2021 15:35:30 GMT
Yes, that's correct and expected. That's why there are multiple return codes allowed, because there will certainly be differences in behavior between implementations, and likely differences between resources.
Jeff
|
|
|
Post by mraineri on Nov 1, 2021 15:39:07 GMT
Even within the same resource, depending on what's being modified, you can return any of those response codes. As Jeff said, it's really up to what makes sense for your implementation. If in one case a PATCH to AccountService returns 200, but in a different case it returns 202, that's perfectly acceptable; clients are supposed to be prepared for those cases.
|
|