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} |
manashsarma | 5786f28 | 2021-08-10 06:40:53 -0500 | [diff] [blame] | 33 | ... valid_status_codes=[${HTTP_FORBIDDEN}] |
manashsarma | 94c97d8 | 2021-07-09 05:25:45 -0500 | [diff] [blame] | 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} |
manashsarma | 5786f28 | 2021-08-10 06:40:53 -0500 | [diff] [blame] | 43 | ... valid_status_codes=[${HTTP_FORBIDDEN}] |
manashsarma | 70adc25 | 2021-07-15 07:07:48 -0500 | [diff] [blame] | 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} |
manashsarma | 5786f28 | 2021-08-10 06:40:53 -0500 | [diff] [blame] | 52 | ... valid_status_codes=[${HTTP_FORBIDDEN}] |
manashsarma | 8fe2b2d | 2021-07-23 01:59:06 -0500 | [diff] [blame] | 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 | |
manashsarma | 5786f28 | 2021-08-10 06:40:53 -0500 | [diff] [blame] | 59 | Redfish.Delete /redfish/v1/AccountService/Accounts/service valid_status_codes=[${HTTP_FORBIDDEN}] |
manashsarma | 39122c1 | 2021-07-26 01:57:37 -0500 | [diff] [blame] | 60 | |
| 61 | |
manashsarma | 9b429d6 | 2021-11-11 04:16:37 -0600 | [diff] [blame] | 62 | Verify Modifying Service User Role |
| 63 | [Documentation] Verify error while modifyig service user role via Redfish. |
| 64 | [Tags] Verify_Modifying_Service_User_Role |
| 65 | |
| 66 | ${payload}= Create Dictionary RoleId=Operator |
| 67 | Redfish.Patch /redfish/v1/AccountService/Accounts/service body=&{payload} |
| 68 | ... valid_status_codes=[${HTTP_FORBIDDEN}] |
| 69 | |
| 70 | |
manashsarma | 677408d | 2021-06-22 07:35:33 -0500 | [diff] [blame] | 71 | *** Keywords *** |
| 72 | |
| 73 | Suite Setup Execution |
| 74 | [Documentation] Do suite setup tasks. |
| 75 | |
| 76 | Redfish.Login |