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 | |
manashsarma | 70adc25 | 2021-07-15 07:07:48 -0500 | [diff] [blame] | 15 | Verify Service User Availability |
manashsarma | 677408d | 2021-06-22 07:35:33 -0500 | [diff] [blame] | 16 | [Documentation] Verify service user avalability. |
manashsarma | 70adc25 | 2021-07-15 07:07:48 -0500 | [diff] [blame] | 17 | [Tags] Verify_Service_User_Availability |
manashsarma | 677408d | 2021-06-22 07:35:33 -0500 | [diff] [blame] | 18 | |
| 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 | |
manashsarma | 94c97d8 | 2021-07-09 05:25:45 -0500 | [diff] [blame] | 26 | Verify Creating User With Service Username |
| 27 | [Documentation] Verify that user with service username can not be created. |
manashsarma | 70adc25 | 2021-07-15 07:07:48 -0500 | [diff] [blame] | 28 | [Tags] Verify_Creating_User_With_Service_Username |
manashsarma | 94c97d8 | 2021-07-09 05:25:45 -0500 | [diff] [blame] | 29 | |
| 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 | |
manashsarma | 70adc25 | 2021-07-15 07:07:48 -0500 | [diff] [blame] | 35 | |
| 36 | Verify 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 | |
manashsarma | 8fe2b2d | 2021-07-23 01:59:06 -0500 | [diff] [blame] | 46 | Verify Renaming Service User |
| 47 | [Documentation] Verify error while renaming service user via Redfish. |
manashsarma | 39122c1 | 2021-07-26 01:57:37 -0500 | [diff] [blame] | 48 | [Tags] Verify_Renaming_Service_User |
manashsarma | 8fe2b2d | 2021-07-23 01:59:06 -0500 | [diff] [blame] | 49 | |
| 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 | |
manashsarma | 39122c1 | 2021-07-26 01:57:37 -0500 | [diff] [blame] | 55 | Verify 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 | |
manashsarma | 677408d | 2021-06-22 07:35:33 -0500 | [diff] [blame] | 62 | *** Keywords *** |
| 63 | |
| 64 | Suite Setup Execution |
| 65 | [Documentation] Do suite setup tasks. |
| 66 | |
| 67 | Redfish.Login |