Fix missing success code in Account PATCH
Everywhere else in this file, we return messages::success when a
property is patched, except for the password success case. This
normally wouldn't matter much, but redfish-protocol-validator seems to
want to use Password setting as its check for a number of protocol tests
(probably because all Redfish implementations have settable passwords).
This commit adds the appropriate message
Tested:
curl -vvvv --insecure --user root:0penBmc -X PATCH -d '{"Password":
"0penBmc1"}' https://192.168.7.2/redfish/v1/AccountService/Accounts/root
Now returns the Success message from the message registry.
Redfish-protocol-validator PROTO_JSON_ACCEPTED tests now succeed,
improving bmcwebs protocol score by 3 tests passing that were failing.
Counts are 356 passing, 27 failed, 36 not tested.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Iff1096ca590f956b29b2a3dd6c9510d2fe4a0037
diff --git a/redfish-core/lib/account_service.hpp b/redfish-core/lib/account_service.hpp
index 4fcd540..6e7cf28 100644
--- a/redfish-core/lib/account_service.hpp
+++ b/redfish-core/lib/account_service.hpp
@@ -1169,6 +1169,10 @@
messages::internalError(asyncResp->res);
return;
}
+ else
+ {
+ messages::success(asyncResp->res);
+ }
}
if (enabled)