Updated UserPrivilege errors with InvalidArgument
Adding InvalidArgument error to the UserPrivilege property, which will
be returned, when specified user privilege is not in the list as per
the xyz.openbmc_project.User.Manager - AllPrivileges property
Tested:
1. Update the UserPrivilege to unknown privilege.
Command: busctl set-property xyz.openbmc_project.User.Manager
/xyz/openbmc_project/user/user3 xyz.openbmc_project.User.
Attributes UserPrivilege s "test"
Response: Failed to set property UserPrivilege on interface xyz.openbmc_
project.User.Attributes: Invalid argument was given.
2. Update the UserPrivilege to "priv-user"
Command: busctl set-property xyz.openbmc_project.User.Manager
/xyz/openbmc_project/user/user3 xyz.openbmc_project.User.
Attributes UserPrivilege s "priv-user"
Response:
Signed-off-by: Chalapathi Venkataramashetty <chalapathix.venkataramashetty@intel.com>
Change-Id: I82ecc7873ec23e99291f80c4f00481d556c25931
diff --git a/xyz/openbmc_project/User/Attributes.interface.yaml b/xyz/openbmc_project/User/Attributes.interface.yaml
index 24df81b..50d1816 100644
--- a/xyz/openbmc_project/User/Attributes.interface.yaml
+++ b/xyz/openbmc_project/User/Attributes.interface.yaml
@@ -14,9 +14,11 @@
- name: UserPrivilege
type: string
description: >
- Privilege of the user.
+ Privilege of the user. Acceptable values of the system are listed
+ under AllPrivileges property under User.Manager interface.
errors:
- xyz.openbmc_project.Common.Error.InternalFailure
+ - xyz.openbmc_project.Common.Error.InvalidArgument
- name: UserEnabled
type: boolean