blob: 2ca71f7941b2ff73de9e5f349b0438f7356c2356 [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
manashsarma677408d2021-06-22 07:35:33 -050046*** Keywords ***
47
48Suite Setup Execution
49 [Documentation] Do suite setup tasks.
50
51 Redfish.Login