manashsarma | 677408d | 2021-06-22 07:35:33 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This suite is to test service user functionality via Redfish. |
| 3 | |
manashsarma | 94c97d8 | 2021-07-09 05:25:45 -0500 | [diff] [blame] | 4 | Resource ../../lib/connection_client.robot |
| 5 | Resource ../../lib/openbmc_ffdc.robot |
| 6 | Resource ../../lib/bmc_redfish_utils.robot |
manashsarma | 677408d | 2021-06-22 07:35:33 -0500 | [diff] [blame] | 7 | |
| 8 | Suite Setup Suite Setup Execution |
| 9 | Suite Teardown Redfish.Logout |
| 10 | Test Teardown FFDC On Test Case Fail |
| 11 | |
| 12 | |
| 13 | *** Test Cases *** |
| 14 | |
| 15 | Verify service user availability |
| 16 | [Documentation] Verify service user avalability. |
| 17 | |
| 18 | # Verify that service user has administrator privilege. |
| 19 | ${role_config}= Redfish_Utils.Get Attribute |
| 20 | ... /redfish/v1/AccountService/Accounts/service RoleId |
| 21 | |
| 22 | Should Be Equal Administrator ${role_config} |
| 23 | |
| 24 | |
manashsarma | 94c97d8 | 2021-07-09 05:25:45 -0500 | [diff] [blame] | 25 | Verify Creating User With Service Username |
| 26 | [Documentation] Verify that user with service username can not be created. |
| 27 | |
| 28 | ${payload}= Create Dictionary |
| 29 | ... UserName=service Password=TestPwd1 RoleId=Operator Enabled=${True} |
| 30 | Redfish.Post /redfish/v1/AccountService/Accounts/ body=&{payload} |
| 31 | ... valid_status_codes=[${HTTP_BAD_REQUEST}] |
| 32 | |
manashsarma | 677408d | 2021-06-22 07:35:33 -0500 | [diff] [blame] | 33 | *** Keywords *** |
| 34 | |
| 35 | Suite Setup Execution |
| 36 | [Documentation] Do suite setup tasks. |
| 37 | |
| 38 | Redfish.Login |