Rahul Maheshwari | a37963e | 2022-08-29 06:15:47 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Test IPMI and Redfish combinations for user management. |
| 3 | |
| 4 | Resource ../../lib/openbmc_ffdc.robot |
| 5 | Resource ../../lib/ipmi_client.robot |
| 6 | |
| 7 | |
| 8 | *** Test Cases *** |
| 9 | |
| 10 | Create IPMI User Without Any Privilege And Verify Via Redfish |
| 11 | [Documentation] Create user using IPMI without privilege and verify user privilege |
| 12 | ... via Redfish. |
| 13 | [Tags] Create_IPMI_User_Without_Any_Privilege_And_Verify_Via_Redfish |
| 14 | [Setup] Redfish.Login |
| 15 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 16 | ... Delete Created User ${random_userid} AND Redfish.Logout |
| 17 | |
| 18 | # Create IPMI user with random id and username. |
| 19 | ${random_userid}= Evaluate random.randint(2, 15) modules=random |
| 20 | ${random_username}= Generate Random String 8 [LETTERS] |
| 21 | Run IPMI Standard Command |
| 22 | ... user set name ${random_userid} ${random_username} |
| 23 | |
| 24 | # Verify new user privilege level via Redfish. |
| 25 | ${privilege}= Redfish_Utils.Get Attribute |
| 26 | ... /redfish/v1/AccountService/Accounts/${random_username} RoleId |
| 27 | Valid Value privilege ['ReadOnly'] |
| 28 | |