blob: 1eb53f74556219a209f2ba513176f7f06036b28e [file] [log] [blame]
manashsarma677408d2021-06-22 07:35:33 -05001*** Settings ***
2Documentation This suite is to test service user functionality via Redfish.
3
manashsarma94c97d82021-07-09 05:25:45 -05004Resource ../../lib/connection_client.robot
5Resource ../../lib/openbmc_ffdc.robot
6Resource ../../lib/bmc_redfish_utils.robot
manashsarma677408d2021-06-22 07:35:33 -05007
8Suite Setup Suite Setup Execution
9Suite Teardown Redfish.Logout
10Test Teardown FFDC On Test Case Fail
11
12
13*** Test Cases ***
14
manashsarma70adc252021-07-15 07:07:48 -050015Verify Service User Availability
manashsarma677408d2021-06-22 07:35:33 -050016 [Documentation] Verify service user avalability.
manashsarma70adc252021-07-15 07:07:48 -050017 [Tags] Verify_Service_User_Availability
manashsarma677408d2021-06-22 07:35:33 -050018
19 # Verify that service user has administrator privilege.
20 ${role_config}= Redfish_Utils.Get Attribute
21 ... /redfish/v1/AccountService/Accounts/service RoleId
22
23 Should Be Equal Administrator ${role_config}
24
25
manashsarma94c97d82021-07-09 05:25:45 -050026Verify Creating User With Service Username
27 [Documentation] Verify that user with service username can not be created.
manashsarma70adc252021-07-15 07:07:48 -050028 [Tags] Verify_Creating_User_With_Service_Username
manashsarma94c97d82021-07-09 05:25:45 -050029
30 ${payload}= Create Dictionary
31 ... UserName=service Password=TestPwd1 RoleId=Operator Enabled=${True}
32 Redfish.Post /redfish/v1/AccountService/Accounts/ body=&{payload}
33 ... valid_status_codes=[${HTTP_BAD_REQUEST}]
34
manashsarma70adc252021-07-15 07:07:48 -050035
36Verify Modifying Service User Password
37 [Documentation] Verify error while modifying service user password in Redfish.
38 [Tags] Verify_Modifying_Service_User_Password
39
40 ${payload}= Create Dictionary Password=NewTestPwd123
41 # Modification of service user password is not allowed via Redfish API.
42 Redfish.Patch /redfish/v1/AccountService/Accounts/service body=&{payload}
43 ... valid_status_codes=[${HTTP_BAD_REQUEST}]
44
45
manashsarma8fe2b2d2021-07-23 01:59:06 -050046Verify Renaming Service User
47 [Documentation] Verify error while renaming service user via Redfish.
manashsarma39122c12021-07-26 01:57:37 -050048 [Tags] Verify_Renaming_Service_User
manashsarma8fe2b2d2021-07-23 01:59:06 -050049
50 ${payload}= Create Dictionary UserName=new_service
51 Redfish.Patch /redfish/v1/AccountService/Accounts/service body=&{payload}
52 ... valid_status_codes=[${HTTP_BAD_REQUEST}]
53
54
manashsarma39122c12021-07-26 01:57:37 -050055Verify Deleting Service User
56 [Documentation] Verify error while deleting service user via Redfish.
57 [Tags] Verify_Deleting_Service_User
58
59 Redfish.Delete /redfish/v1/AccountService/Accounts/service valid_status_codes=[${HTTP_BAD_REQUEST}]
60
61
manashsarma677408d2021-06-22 07:35:33 -050062*** Keywords ***
63
64Suite Setup Execution
65 [Documentation] Do suite setup tasks.
66
67 Redfish.Login