Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Test suite for OpenBMC IPMI user management. |
| 3 | |
| 4 | Resource ../lib/ipmi_client.robot |
| 5 | Resource ../lib/openbmc_ffdc.robot |
| 6 | Library ../lib/ipmi_utils.py |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 7 | Test Setup Printn |
Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 8 | |
Rahul Maheshwari | f646baa | 2019-02-20 12:29:35 -0600 | [diff] [blame] | 9 | Test Teardown Test Teardown Execution |
Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 10 | |
| 11 | *** Variables *** |
| 12 | |
| 13 | ${invalid_username} user% |
| 14 | ${invalid_password} abc123 |
chithrag | c0582f7 | 2021-12-08 10:34:23 -0500 | [diff] [blame] | 15 | ${new_username} newuser |
Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 16 | ${root_userid} 1 |
| 17 | ${operator_level_priv} 0x3 |
Rahul Maheshwari | c05bf56 | 2019-03-01 04:02:53 -0600 | [diff] [blame] | 18 | ${user_priv} 2 |
| 19 | ${operator_priv} 3 |
Rahul Maheshwari | ef0a735 | 2019-02-20 11:07:48 -0600 | [diff] [blame] | 20 | ${admin_level_priv} 4 |
Rahul Maheshwari | c05bf56 | 2019-03-01 04:02:53 -0600 | [diff] [blame] | 21 | ${no_access_priv} 15 |
Rahul Maheshwari | c19f838 | 2019-02-20 08:19:22 -0600 | [diff] [blame] | 22 | ${valid_password} 0penBmc1 |
| 23 | ${max_password_length} 20 |
Rahul Maheshwari | ef0a735 | 2019-02-20 11:07:48 -0600 | [diff] [blame] | 24 | ${ipmi_setaccess_cmd} channel setaccess |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 25 | &{password_values} 16=0penBmc10penBmc2 17=0penBmc10penBmc2B |
| 26 | ... 20=0penBmc10penBmc2Bmc3 21=0penBmc10penBmc2Bmc34 |
Anusha Dathatri | 466816f | 2020-01-30 05:12:36 -0600 | [diff] [blame] | 27 | ... 7=0penBmc 8=0penBmc0 |
Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 28 | |
Ashwini Chandrappa | 5cefabf | 2021-08-30 23:48:14 -0500 | [diff] [blame] | 29 | # User defined count. |
| 30 | ${USER_LOOP_COUNT} 20 |
| 31 | |
Rahul Maheshwari | dd63c74 | 2019-02-27 23:03:54 -0600 | [diff] [blame] | 32 | |
Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 33 | *** Test Cases *** |
| 34 | |
Rahul Maheshwari | ffc7735 | 2019-02-25 09:05:27 -0600 | [diff] [blame] | 35 | Verify IPMI User Summary |
| 36 | [Documentation] Verify IPMI maximum supported IPMI user ID and |
| 37 | ... enabled user form user summary |
| 38 | [Tags] Verify_IPMI_User_Summary |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 39 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 40 | ... Delete Created User ${random_userid} |
Rahul Maheshwari | ffc7735 | 2019-02-25 09:05:27 -0600 | [diff] [blame] | 41 | # Delete all non-root IPMI (i.e. except userid 1) |
| 42 | Delete All Non Root IPMI User |
| 43 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 44 | ${random_userid} ${random_username}= Create Random IPMI User |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 45 | Set Test Variable ${random_userid} |
Rahul Maheshwari | ffc7735 | 2019-02-25 09:05:27 -0600 | [diff] [blame] | 46 | Run IPMI Standard Command user enable ${random_userid} |
| 47 | |
| 48 | # Verify maximum user count IPMI local user can have. Also verify |
| 49 | # currently enabled users. |
Tony Lee | 86fd673 | 2020-06-03 14:12:05 +0800 | [diff] [blame] | 50 | ${resp}= Wait Until Keyword Succeeds 15 sec 5 sec Run IPMI Standard Command |
| 51 | ... user summary ${CHANNEL_NUMBER} |
Rahul Maheshwari | ffc7735 | 2019-02-25 09:05:27 -0600 | [diff] [blame] | 52 | ${enabled_user_count}= |
| 53 | ... Get Lines Containing String ${resp} Enabled User Count |
| 54 | ${maximum_ids}= Get Lines Containing String ${resp} Maximum IDs |
| 55 | Should Contain ${enabled_user_count} 2 |
| 56 | Should Contain ${maximum_ids} 15 |
| 57 | |
| 58 | |
Tony Lee | 3d351ee | 2020-02-19 10:21:04 +0800 | [diff] [blame] | 59 | Verify IPMI User List |
| 60 | [Documentation] Verify user list via IPMI. |
| 61 | [Tags] Verify_IPMI_User_List |
| 62 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 63 | ... Delete Created User ${random_userid} |
| 64 | |
| 65 | ${random_userid} ${random_username}= Create Random IPMI User |
| 66 | Set Test Variable ${random_userid} |
| 67 | |
| 68 | Run IPMI Standard Command |
| 69 | ... user set password ${random_userid} ${valid_password} |
| 70 | Run IPMI Standard Command user enable ${random_userid} |
| 71 | # Delay added for IPMI user to get enabled. |
| 72 | Sleep 5s |
| 73 | # Set admin privilege and enable IPMI messaging for newly created user. |
| 74 | Set Channel Access ${random_userid} ipmi=on privilege=${admin_level_priv} |
| 75 | |
| 76 | ${users_access}= Get User Access Ipmi ${CHANNEL_NUMBER} |
| 77 | Rprint Vars users_access |
| 78 | |
| 79 | ${index}= Evaluate ${random_userid} - 1 |
| 80 | # Verify the user access of created user. |
| 81 | Valid Value users_access[${index}]['id'] ['${random_userid}'] |
| 82 | Valid Value users_access[${index}]['name'] ['${random_username}'] |
| 83 | Valid Value users_access[${index}]['callin'] ['true'] |
| 84 | Valid Value users_access[${index}]['link'] ['false'] |
| 85 | Valid Value users_access[${index}]['auth'] ['true'] |
| 86 | Valid Value users_access[${index}]['ipmi'] ['ADMINISTRATOR'] |
| 87 | |
| 88 | |
Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 89 | Verify IPMI User Creation With Valid Name And ID |
| 90 | [Documentation] Create user via IPMI and verify. |
George Keishing | b98036a | 2022-01-31 12:39:47 -0600 | [diff] [blame] | 91 | [Tags] Verify_IPMI_User_Creation_With_Valid_Name_And_ID |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 92 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 93 | ... Delete Created User ${random_userid} |
Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 94 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 95 | ${random_userid} ${random_username}= Create Random IPMI User |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 96 | Set Test Variable ${random_userid} |
Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 97 | |
| 98 | |
| 99 | Verify IPMI User Creation With Invalid Name |
| 100 | [Documentation] Verify error while creating IPMI user with invalid |
George Keishing | c2a6f09 | 2019-02-20 12:26:54 -0600 | [diff] [blame] | 101 | ... name(e.g. user name with special characters). |
Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 102 | [Tags] Verify_IPMI_User_Creation_With_Invalid_Name |
| 103 | |
Rahul Maheshwari | 976a170 | 2019-02-21 01:47:58 -0600 | [diff] [blame] | 104 | ${random_userid}= Evaluate random.randint(2, 15) modules=random |
Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 105 | ${msg}= Run Keyword And Expect Error * Run IPMI Standard Command |
| 106 | ... user set name ${random_userid} ${invalid_username} |
| 107 | Should Contain ${msg} Invalid data |
| 108 | |
| 109 | |
| 110 | Verify IPMI User Creation With Invalid ID |
| 111 | [Documentation] Verify error while creating IPMI user with invalid |
| 112 | ... ID(i.e. any number greater than 15 or 0). |
| 113 | [Tags] Verify_IPMI_User_Creation_With_Invalid_ID |
| 114 | |
| 115 | @{id_list}= Create List |
| 116 | ${random_invalid_id}= Evaluate random.randint(16, 1000) modules=random |
| 117 | Append To List ${id_list} ${random_invalid_id} |
| 118 | Append To List ${id_list} 0 |
| 119 | |
Sushil Singh | be97ffc | 2019-06-04 06:34:24 -0500 | [diff] [blame] | 120 | FOR ${id} IN @{id_list} |
| 121 | ${msg}= Run Keyword And Expect Error * Run IPMI Standard Command |
| 122 | ... user set name ${id} newuser |
Tony Lee | c8ed753 | 2020-01-09 16:15:16 +0800 | [diff] [blame] | 123 | Should Contain Any ${msg} User ID is limited to range Parameter out of range |
Sushil Singh | be97ffc | 2019-06-04 06:34:24 -0500 | [diff] [blame] | 124 | END |
Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 125 | |
| 126 | Verify Setting IPMI User With Invalid Password |
| 127 | [Documentation] Verify error while setting IPMI user with invalid |
| 128 | ... password. |
| 129 | [Tags] Verify_Setting_IPMI_User_With_Invalid_Password |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 130 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 131 | ... Delete Created User ${random_userid} |
Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 132 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 133 | ${random_userid} ${random_username}= Create Random IPMI User |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 134 | Set Test Variable ${random_userid} |
Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 135 | |
| 136 | # Set invalid password for newly created user. |
| 137 | ${msg}= Run Keyword And Expect Error * Run IPMI Standard Command |
| 138 | ... user set password ${random_userid} ${invalid_password} |
| 139 | |
Sushma M M | 97fccae | 2020-07-27 14:55:19 -0500 | [diff] [blame] | 140 | # Delay added for user password to get set. |
| 141 | Sleep 5s |
| 142 | |
Anusha Dathatri | a54cddc | 2019-08-07 10:01:16 -0500 | [diff] [blame] | 143 | Should Contain ${msg} Set User Password command failed |
Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 144 | |
| 145 | Verify Setting IPMI Root User With New Name |
| 146 | [Documentation] Verify error while setting IPMI root user with new |
| 147 | ... name. |
| 148 | [Tags] Verify_Setting_IPMI_Root_User_With_New_Name |
| 149 | |
| 150 | # Set invalid password for newly created user. |
| 151 | ${msg}= Run Keyword And Expect Error * Run IPMI Standard Command |
| 152 | ... user set name ${root_userid} abcd |
| 153 | |
| 154 | Should Contain ${msg} Set User Name command failed |
| 155 | |
| 156 | |
Rahul Maheshwari | c19f838 | 2019-02-20 08:19:22 -0600 | [diff] [blame] | 157 | Verify IPMI User Password Via Test Command |
| 158 | [Documentation] Verify IPMI user password using test command. |
| 159 | [Tags] Verify_IPMI_User_Password_Via_Test_Command |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 160 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 161 | ... Delete Created User ${random_userid} |
Rahul Maheshwari | c19f838 | 2019-02-20 08:19:22 -0600 | [diff] [blame] | 162 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 163 | ${random_userid} ${random_username}= Create Random IPMI User |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 164 | Set Test Variable ${random_userid} |
Rahul Maheshwari | c19f838 | 2019-02-20 08:19:22 -0600 | [diff] [blame] | 165 | |
| 166 | # Set valid password for newly created user. |
| 167 | Run IPMI Standard Command |
| 168 | ... user set password ${random_userid} ${valid_password} |
| 169 | |
| 170 | # Verify newly set password using test command. |
| 171 | ${msg}= Run IPMI Standard Command |
| 172 | ... user test ${random_userid} ${max_password_length} ${valid_password} |
| 173 | |
| 174 | Should Contain ${msg} Success |
| 175 | |
| 176 | |
Rahul Maheshwari | ef0a735 | 2019-02-20 11:07:48 -0600 | [diff] [blame] | 177 | Verify Setting Valid Password For IPMI User |
| 178 | [Documentation] Set valid password for IPMI user and verify. |
| 179 | [Tags] Verify_Setting_Valid_Password_For_IPMI_User |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 180 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 181 | ... Delete Created User ${random_userid} |
Rahul Maheshwari | ef0a735 | 2019-02-20 11:07:48 -0600 | [diff] [blame] | 182 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 183 | ${random_userid} ${random_username}= Create Random IPMI User |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 184 | Set Test Variable ${random_userid} |
Rahul Maheshwari | ef0a735 | 2019-02-20 11:07:48 -0600 | [diff] [blame] | 185 | |
| 186 | # Set valid password for newly created user. |
| 187 | Run IPMI Standard Command |
| 188 | ... user set password ${random_userid} ${valid_password} |
| 189 | |
Rahul Maheshwari | ef0a735 | 2019-02-20 11:07:48 -0600 | [diff] [blame] | 190 | Run IPMI Standard Command user enable ${random_userid} |
| 191 | |
Rahul Maheshwari | 7d232ab | 2019-08-29 06:44:16 -0500 | [diff] [blame] | 192 | # Delay added for IPMI user to get enable |
| 193 | Sleep 5s |
| 194 | |
Rahul Maheshwari | ef0a735 | 2019-02-20 11:07:48 -0600 | [diff] [blame] | 195 | # Set admin privilege and enable IPMI messaging for newly created user |
| 196 | Set Channel Access ${random_userid} ipmi=on privilege=${admin_level_priv} |
| 197 | |
| 198 | Verify IPMI Username And Password ${random_username} ${valid_password} |
| 199 | |
| 200 | |
Rahul Maheshwari | 404da0d | 2019-02-18 23:24:17 -0600 | [diff] [blame] | 201 | Verify IPMI User Creation With Same Name |
| 202 | [Documentation] Verify error while creating two IPMI user with same name. |
| 203 | [Tags] Verify_IPMI_User_Creation_With_Same_Name |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 204 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 205 | ... Delete Created User 2 |
Rahul Maheshwari | 404da0d | 2019-02-18 23:24:17 -0600 | [diff] [blame] | 206 | |
| 207 | ${random_username}= Generate Random String 8 [LETTERS] |
| 208 | IPMI Create User 2 ${random_username} |
| 209 | |
| 210 | # Set same username for another IPMI user. |
| 211 | ${msg}= Run Keyword And Expect Error * Run IPMI Standard Command |
| 212 | ... user set name 3 ${random_username} |
| 213 | Should Contain ${msg} Invalid data field in request |
| 214 | |
| 215 | |
| 216 | Verify Setting IPMI User With Null Password |
| 217 | [Documentation] Verify error while setting IPMI user with null |
| 218 | ... password. |
| 219 | [Tags] Verify_Setting_IPMI_User_With_Null_Password |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 220 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 221 | ... Delete Created User ${random_userid} |
Rahul Maheshwari | 404da0d | 2019-02-18 23:24:17 -0600 | [diff] [blame] | 222 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 223 | ${random_userid} ${random_username}= Create Random IPMI User |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 224 | Set Test Variable ${random_userid} |
Rahul Maheshwari | 404da0d | 2019-02-18 23:24:17 -0600 | [diff] [blame] | 225 | |
| 226 | # Set null password for newly created user. |
| 227 | ${msg}= Run Keyword And Expect Error * Run IPMI Standard Command |
| 228 | ... user set password ${random_userid} "" |
| 229 | |
| 230 | Should Contain ${msg} Invalid data field in request |
| 231 | |
| 232 | |
Rahul Maheshwari | 645a113 | 2019-02-18 03:29:27 -0600 | [diff] [blame] | 233 | Verify IPMI User Deletion |
| 234 | [Documentation] Delete user via IPMI and verify. |
| 235 | [Tags] Verify_IPMI_User_Deletion |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 236 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 237 | ... Delete Created User ${random_userid} |
Rahul Maheshwari | 645a113 | 2019-02-18 03:29:27 -0600 | [diff] [blame] | 238 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 239 | ${random_userid} ${random_username}= Create Random IPMI User |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 240 | Set Test Variable ${random_userid} |
Rahul Maheshwari | 645a113 | 2019-02-18 03:29:27 -0600 | [diff] [blame] | 241 | # Delete IPMI User and verify |
| 242 | Run IPMI Standard Command user set name ${random_userid} "" |
Rahul Maheshwari | 4f4688f | 2019-02-28 00:49:10 -0600 | [diff] [blame] | 243 | ${user_info}= Get User Info ${random_userid} |
Rahul Maheshwari | 645a113 | 2019-02-18 03:29:27 -0600 | [diff] [blame] | 244 | Should Be Equal ${user_info['user_name']} ${EMPTY} |
| 245 | |
| 246 | |
Rahul Maheshwari | c05bf56 | 2019-03-01 04:02:53 -0600 | [diff] [blame] | 247 | Test IPMI User Privilege Level |
| 248 | [Documentation] Verify IPMI user with user privilege can only run user level commands. |
| 249 | [Tags] Test_IPMI_User_Privilege_Level |
| 250 | [Template] Test IPMI User Privilege |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 251 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 252 | ... Delete Created User ${random_userid} |
Rahul Maheshwari | c05bf56 | 2019-03-01 04:02:53 -0600 | [diff] [blame] | 253 | |
| 254 | #Privilege level User Cmd Status Operator Cmd Status Admin Cmd Status |
| 255 | ${user_priv} Passed Failed Failed |
| 256 | |
| 257 | |
| 258 | Test IPMI Operator Privilege Level |
| 259 | [Documentation] Verify IPMI user with operator privilege can only run user and operator levels commands. |
| 260 | ... level is set to operator. |
| 261 | [Tags] Test_IPMI_Operator_Privilege_Level |
| 262 | [Template] Test IPMI User Privilege |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 263 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 264 | ... Delete Created User ${random_userid} |
Rahul Maheshwari | c05bf56 | 2019-03-01 04:02:53 -0600 | [diff] [blame] | 265 | |
| 266 | #Privilege level User Cmd Status Operator Cmd Status Admin Cmd Status |
| 267 | ${operator_priv} Passed Passed Failed |
| 268 | |
| 269 | |
| 270 | Test IPMI Administrator Privilege Level |
| 271 | [Documentation] Verify IPMI user with admin privilege can run all levels command. |
| 272 | [Tags] Test_IPMI_Administrator_Privilege_Level |
| 273 | [Template] Test IPMI User Privilege |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 274 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 275 | ... Delete Created User ${random_userid} |
Rahul Maheshwari | c05bf56 | 2019-03-01 04:02:53 -0600 | [diff] [blame] | 276 | |
| 277 | #Privilege level User Cmd Status Operator Cmd Status Admin Cmd Status |
| 278 | ${admin_level_priv} Passed Passed Passed |
| 279 | |
| 280 | |
| 281 | Test IPMI No Access Privilege Level |
| 282 | [Documentation] Verify IPMI user with no access privilege can not run only any level command. |
| 283 | [Tags] Test_IPMI_No_Access_Privilege_Level |
| 284 | [Template] Test IPMI User Privilege |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 285 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 286 | ... Delete Created User ${random_userid} |
Rahul Maheshwari | c05bf56 | 2019-03-01 04:02:53 -0600 | [diff] [blame] | 287 | |
| 288 | #Privilege level User Cmd Status Operator Cmd Status Admin Cmd Status |
| 289 | ${no_access_priv} Failed Failed Failed |
| 290 | |
| 291 | |
Rahul Maheshwari | 0c71f5e | 2019-02-20 03:52:55 -0600 | [diff] [blame] | 292 | Enable IPMI User And Verify |
| 293 | [Documentation] Enable IPMI user and verify that the user is able |
| 294 | ... to run IPMI command. |
| 295 | [Tags] Enable_IPMI_User_And_Verify |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 296 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 297 | ... Delete Created User ${random_userid} |
Rahul Maheshwari | 0c71f5e | 2019-02-20 03:52:55 -0600 | [diff] [blame] | 298 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 299 | ${random_userid} ${random_username}= Create Random IPMI User |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 300 | Set Test Variable ${random_userid} |
Rahul Maheshwari | 0c71f5e | 2019-02-20 03:52:55 -0600 | [diff] [blame] | 301 | Run IPMI Standard Command |
| 302 | ... user set password ${random_userid} ${valid_password} |
| 303 | |
| 304 | # Set admin privilege and enable IPMI messaging for newly created user. |
| 305 | Set Channel Access ${random_userid} ipmi=on privilege=${admin_level_priv} |
| 306 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 307 | # Delay added for user privilege to get set. |
Rahul Maheshwari | 62c8aea | 2019-09-27 05:23:12 -0500 | [diff] [blame] | 308 | Sleep 5s |
| 309 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 310 | Enable IPMI User And Verify ${random_userid} |
Rahul Maheshwari | 0c71f5e | 2019-02-20 03:52:55 -0600 | [diff] [blame] | 311 | |
| 312 | # Verify that enabled IPMI user is able to run IPMI command. |
| 313 | Verify IPMI Username And Password ${random_username} ${valid_password} |
| 314 | |
| 315 | |
| 316 | Disable IPMI User And Verify |
| 317 | [Documentation] Disable IPMI user and verify that that the user |
| 318 | ... is unable to run IPMI command. |
| 319 | [Tags] Disable_IPMI_User_And_Verify |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 320 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 321 | ... Delete Created User ${random_userid} |
Rahul Maheshwari | 0c71f5e | 2019-02-20 03:52:55 -0600 | [diff] [blame] | 322 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 323 | ${random_userid} ${random_username}= Create Random IPMI User |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 324 | Set Test Variable ${random_userid} |
Rahul Maheshwari | 0c71f5e | 2019-02-20 03:52:55 -0600 | [diff] [blame] | 325 | Run IPMI Standard Command |
| 326 | ... user set password ${random_userid} ${valid_password} |
| 327 | |
| 328 | # Set admin privilege and enable IPMI messaging for newly created user. |
| 329 | Set Channel Access ${random_userid} ipmi=on privilege=${admin_level_priv} |
| 330 | |
| 331 | # Disable IPMI user and verify. |
| 332 | Run IPMI Standard Command user disable ${random_userid} |
| 333 | ${user_info}= Get User Info ${random_userid} |
| 334 | Should Be Equal ${user_info['enable_status']} disabled |
| 335 | |
| 336 | # Verify that disabled IPMI user is unable to run IPMI command. |
| 337 | ${msg}= Run Keyword And Expect Error * Verify IPMI Username And Password |
| 338 | ... ${random_username} ${valid_password} |
Rahul Maheshwari | c3d1e96 | 2019-03-06 23:53:21 -0600 | [diff] [blame] | 339 | Should Contain ${msg} Unable to establish IPMI |
Rahul Maheshwari | 0c71f5e | 2019-02-20 03:52:55 -0600 | [diff] [blame] | 340 | |
Rahul Maheshwari | c19f838 | 2019-02-20 08:19:22 -0600 | [diff] [blame] | 341 | |
Rahul Maheshwari | dd63c74 | 2019-02-27 23:03:54 -0600 | [diff] [blame] | 342 | Verify IPMI Root User Password Change |
| 343 | [Documentation] Change IPMI root user password and verify that |
| 344 | ... root user is able to run IPMI command. |
| 345 | [Tags] Verify_IPMI_Root_User_Password_Change |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 346 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 347 | ... Wait Until Keyword Succeeds 15 sec 5 sec |
Rahul Maheshwari | dd63c74 | 2019-02-27 23:03:54 -0600 | [diff] [blame] | 348 | ... Set Default Password For IPMI Root User |
| 349 | |
Anusha Dathatri | 9f84bc8 | 2020-01-28 07:46:48 -0600 | [diff] [blame] | 350 | # User input password should be minimum 8 characters long. |
| 351 | Valid Length OPENBMC_PASSWORD min_length=8 |
Rahul Maheshwari | dd63c74 | 2019-02-27 23:03:54 -0600 | [diff] [blame] | 352 | # Set new password for root user. |
| 353 | Run IPMI Standard Command |
| 354 | ... user set password ${root_userid} ${valid_password} |
| 355 | |
Sushma M M | 97fccae | 2020-07-27 14:55:19 -0500 | [diff] [blame] | 356 | # Delay added for user password to get set. |
| 357 | Sleep 5s |
| 358 | |
Rahul Maheshwari | dd63c74 | 2019-02-27 23:03:54 -0600 | [diff] [blame] | 359 | # Verify that root user is able to run IPMI command using new password. |
Rahul Maheshwari | 62c8aea | 2019-09-27 05:23:12 -0500 | [diff] [blame] | 360 | Wait Until Keyword Succeeds 15 sec 5 sec Verify IPMI Username And Password |
| 361 | ... root ${valid_password} |
Rahul Maheshwari | dd63c74 | 2019-02-27 23:03:54 -0600 | [diff] [blame] | 362 | |
| 363 | |
Rahul Maheshwari | 8e17562 | 2019-05-20 05:30:32 -0500 | [diff] [blame] | 364 | Verify Administrator And No Access Privilege For Different Channels |
| 365 | [Documentation] Set administrator and no access privilege for different channels and verify. |
| 366 | [Tags] Verify_Administrator_And_No_Access_Privilege_For_Different_Channels |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 367 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 368 | ... Delete Created User ${random_userid} |
Rahul Maheshwari | 8e17562 | 2019-05-20 05:30:32 -0500 | [diff] [blame] | 369 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 370 | ${random_userid} ${random_username}= Create Random IPMI User |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 371 | Set Test Variable ${random_userid} |
Rahul Maheshwari | 8e17562 | 2019-05-20 05:30:32 -0500 | [diff] [blame] | 372 | Run IPMI Standard Command |
| 373 | ... user set password ${random_userid} ${valid_password} |
| 374 | |
| 375 | # Set admin privilege for newly created user with channel 1. |
| 376 | Set Channel Access ${random_userid} ipmi=on privilege=${admin_level_priv} 1 |
| 377 | |
| 378 | # Set no access privilege for newly created user with channel 2. |
| 379 | Set Channel Access ${random_userid} ipmi=on privilege=${no_access_priv} 2 |
| 380 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 381 | Enable IPMI User And Verify ${random_userid} |
Rahul Maheshwari | 8e17562 | 2019-05-20 05:30:32 -0500 | [diff] [blame] | 382 | |
| 383 | # Verify that user is able to run administrator level IPMI command with channel 1. |
| 384 | Verify IPMI Command ${random_username} ${valid_password} Administrator 1 |
| 385 | |
| 386 | # Verify that user is unable to run IPMI command with channel 2. |
| 387 | Run IPMI Standard Command sel info 2 expected_rc=${1} U=${random_username} P=${valid_password} |
| 388 | |
| 389 | |
| 390 | Verify Operator And User Privilege For Different Channels |
| 391 | [Documentation] Set operator and user privilege for different channels and verify. |
| 392 | [Tags] Verify_Operator_And_User_Privilege_For_Different_Channels |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 393 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 394 | ... Delete Created User ${random_userid} |
Rahul Maheshwari | 8e17562 | 2019-05-20 05:30:32 -0500 | [diff] [blame] | 395 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 396 | ${random_userid} ${random_username}= Create Random IPMI User |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 397 | Set Test Variable ${random_userid} |
Rahul Maheshwari | 8e17562 | 2019-05-20 05:30:32 -0500 | [diff] [blame] | 398 | Run IPMI Standard Command |
| 399 | ... user set password ${random_userid} ${valid_password} |
| 400 | |
| 401 | # Set operator privilege for newly created user with channel 1. |
| 402 | Set Channel Access ${random_userid} ipmi=on privilege=${operator_priv} 1 |
| 403 | |
| 404 | # Set user privilege for newly created user with channel 2. |
| 405 | Set Channel Access ${random_userid} ipmi=on privilege=${user_priv} 2 |
| 406 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 407 | Enable IPMI User And Verify ${random_userid} |
Rahul Maheshwari | 8e17562 | 2019-05-20 05:30:32 -0500 | [diff] [blame] | 408 | |
| 409 | # Verify that user is able to run operator level IPMI command with channel 1. |
| 410 | Verify IPMI Command ${random_username} ${valid_password} Operator 1 |
| 411 | |
| 412 | # Verify that user is able to run user level IPMI command with channel 2. |
| 413 | Verify IPMI Command ${random_username} ${valid_password} User 2 |
| 414 | |
| 415 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 416 | Verify Setting IPMI User With Max Password Length |
| 417 | [Documentation] Verify IPMI user creation with password length of 20 characters. |
| 418 | [Tags] Verify_Setting_IPMI_User_With_Max_Password_Length |
| 419 | [Template] Set User Password And Verify |
| 420 | |
| 421 | # password_length password_option expected_status |
| 422 | 20 20 ${True} |
| 423 | |
| 424 | |
| 425 | Verify Setting IPMI User With Invalid Password Length |
| 426 | [Documentation] Verify that IPMI user cannot be set with 21 character password using 16 char |
| 427 | ... or 20 char password option. |
| 428 | [Tags] Verify_Setting_IPMI_User_With_Invalid_Password_Length |
| 429 | [Template] Set User Password And Verify |
| 430 | |
| 431 | # password_length password_option expected_status |
| 432 | 21 16 ${False} |
| 433 | 21 20 ${False} |
| 434 | |
| 435 | |
| 436 | Verify Setting IPMI User With 16 Character Password |
| 437 | [Documentation] Verify that IPMI user can create a 16 character password using 16 char or 20 |
| 438 | ... char password option. |
| 439 | [Tags] Verify_Setting_IPMI_User_With_16_Character_Password |
| 440 | [Template] Set User Password And Verify |
| 441 | |
| 442 | # password_length password_option expected_status |
| 443 | 16 16 ${True} |
| 444 | 16 20 ${True} |
| 445 | |
| 446 | |
| 447 | Verify Default Selection Of 16 Character Password For IPMI User |
| 448 | [Documentation] Verify that ipmitool by default opts for the 16 character option when given a |
| 449 | ... password whose length is in between 17 and 20. |
| 450 | [Tags] Verify_Default_Selection_Of_16_Character_Password_For_IPMI_User |
| 451 | [Template] Set User Password And Verify |
| 452 | |
| 453 | # password_length password_option expected_status |
| 454 | 17 16 ${True} |
| 455 | 20 16 ${True} |
| 456 | |
| 457 | |
Anusha Dathatri | 466816f | 2020-01-30 05:12:36 -0600 | [diff] [blame] | 458 | Verify Minimum Password Length For IPMI User |
| 459 | [Documentation] Verify minimum password length of 8 characters. |
| 460 | [Tags] Verify_Minimum_Password_Length_For_IPMI_User |
| 461 | [Template] Set User Password And Verify |
| 462 | |
| 463 | # password_length password_option expected_status |
| 464 | 7 16 ${False} |
| 465 | 8 16 ${True} |
| 466 | 7 20 ${False} |
| 467 | 8 20 ${True} |
| 468 | |
| 469 | |
Ashwini Chandrappa | 5cefabf | 2021-08-30 23:48:14 -0500 | [diff] [blame] | 470 | Verify Continuous IPMI Command Execution |
| 471 | [Documentation] Verify that continuous IPMI command execution runs fine. |
| 472 | [Tags] Verify_Continuous_IPMI_Command_Execution |
| 473 | |
| 474 | FOR ${i} IN RANGE ${USER_LOOP_COUNT} |
| 475 | Run IPMI Standard Command lan print |
| 476 | Run IPMI Standard Command power status |
| 477 | Run IPMI Standard Command fru list |
| 478 | Run IPMI Standard Command sel list |
| 479 | END |
| 480 | |
| 481 | |
chithrag | c0582f7 | 2021-12-08 10:34:23 -0500 | [diff] [blame] | 482 | Modify IPMI User |
| 483 | [Documentation] Verify modified IPMI user is communicating via IPMI. |
| 484 | [Tags] Modify_IPMI_User |
| 485 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 486 | ... Delete Created User ${random_userid} |
| 487 | |
| 488 | ${random_userid} ${random_username}= Create Random IPMI User |
| 489 | Set Test Variable ${random_userid} |
| 490 | Run IPMI Standard Command |
| 491 | ... user set password ${random_userid} ${valid_password} |
| 492 | |
| 493 | # Set admin privilege and enable IPMI messaging for newly created user. |
| 494 | Set Channel Access ${random_userid} ipmi=on privilege=${admin_level_priv} |
| 495 | |
| 496 | # Delay added for user privilege to get set. |
| 497 | Sleep 5s |
| 498 | |
| 499 | Enable IPMI User And Verify ${random_userid} |
| 500 | |
| 501 | # Verify that user is able to run administrator level IPMI command. |
| 502 | Verify IPMI Command ${random_username} ${valid_password} Administrator ${CHANNEL_NUMBER} |
| 503 | |
| 504 | # Set different username for same IPMI user. |
| 505 | Run IPMI Standard Command |
| 506 | ... user set name ${random_userid} ${new_username} |
| 507 | |
| 508 | # Verify that user is able to run administrator level IPMI command. |
| 509 | Verify IPMI Command ${new_username} ${valid_password} Administrator ${CHANNEL_NUMBER} |
| 510 | |
| 511 | |
Rahul Maheshwari | ddfc0cb | 2019-02-07 23:43:19 -0600 | [diff] [blame] | 512 | *** Keywords *** |
| 513 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 514 | Create Random IPMI User |
| 515 | [Documentation] Create IPMI user with random username and userid and return those fields. |
| 516 | |
| 517 | ${random_username}= Generate Random String 8 [LETTERS] |
| 518 | ${random_userid}= Evaluate random.randint(2, 15) modules=random |
| 519 | IPMI Create User ${random_userid} ${random_username} |
| 520 | [Return] ${random_userid} ${random_username} |
| 521 | |
| 522 | |
| 523 | Enable IPMI User And Verify |
| 524 | [Documentation] Enable the userid and verify that it has been enabled. |
| 525 | [Arguments] ${userid} |
| 526 | |
| 527 | # Description of argument(s): |
| 528 | # userid A numeric userid (e.g. "4"). |
| 529 | |
| 530 | Run IPMI Standard Command user enable ${userid} |
| 531 | ${user_info}= Get User Info ${userid} |
| 532 | Valid Value user_info['enable_status'] ['enabled'] |
| 533 | |
| 534 | |
Rahul Maheshwari | dd63c74 | 2019-02-27 23:03:54 -0600 | [diff] [blame] | 535 | Set Default Password For IPMI Root User |
| 536 | [Documentation] Set default password for IPMI root user (i.e. 0penBmc). |
Rahul Maheshwari | dd63c74 | 2019-02-27 23:03:54 -0600 | [diff] [blame] | 537 | # Set default password for root user. |
| 538 | ${result}= Run External IPMI Standard Command |
| 539 | ... user set password ${root_userid} ${OPENBMC_PASSWORD} |
| 540 | ... P=${valid_password} |
| 541 | Should Contain ${result} Set User Password command successful |
| 542 | |
| 543 | # Verify that root user is able to run IPMI command using default password. |
| 544 | Verify IPMI Username And Password root ${OPENBMC_PASSWORD} |
| 545 | |
Rahul Maheshwari | ef0a735 | 2019-02-20 11:07:48 -0600 | [diff] [blame] | 546 | |
Rahul Maheshwari | c05bf56 | 2019-03-01 04:02:53 -0600 | [diff] [blame] | 547 | Test IPMI User Privilege |
| 548 | [Documentation] Test IPMI user privilege by executing IPMI command with different privileges. |
| 549 | [Arguments] ${privilege_level} ${user_cmd_status} ${operator_cmd_status} ${admin_cmd_status} |
| 550 | |
| 551 | # Description of argument(s): |
| 552 | # privilege_level Privilege level of IPMI user (e.g. 4, 3). |
| 553 | # user_cmd_status Expected status of IPMI command run with the "User" |
| 554 | # privilege (i.e. "Passed" or "Failed"). |
| 555 | # operator_cmd_status Expected status of IPMI command run with the "Operator" |
| 556 | # privilege (i.e. "Passed" or "Failed"). |
| 557 | # admin_cmd_status Expected status of IPMI command run with the "Administrator" |
| 558 | # privilege (i.e. "Passed" or "Failed"). |
| 559 | |
| 560 | # Create IPMI user and set valid password. |
| 561 | ${random_username}= Generate Random String 8 [LETTERS] |
| 562 | ${random_userid}= Evaluate random.randint(2, 15) modules=random |
| 563 | IPMI Create User ${random_userid} ${random_username} |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 564 | Set Test Variable ${random_userid} |
Rahul Maheshwari | c05bf56 | 2019-03-01 04:02:53 -0600 | [diff] [blame] | 565 | Run IPMI Standard Command |
| 566 | ... user set password ${random_userid} ${valid_password} |
| 567 | |
| 568 | # Set privilege and enable IPMI messaging for newly created user. |
| 569 | Set Channel Access ${random_userid} ipmi=on privilege=${privilege_level} |
| 570 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 571 | # Delay added for user privilege to get set. |
Rahul Maheshwari | 62c8aea | 2019-09-27 05:23:12 -0500 | [diff] [blame] | 572 | Sleep 5s |
| 573 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 574 | Enable IPMI User And Verify ${random_userid} |
Rahul Maheshwari | c05bf56 | 2019-03-01 04:02:53 -0600 | [diff] [blame] | 575 | |
Rahul Maheshwari | 8e17562 | 2019-05-20 05:30:32 -0500 | [diff] [blame] | 576 | Verify IPMI Command ${random_username} ${valid_password} User |
| 577 | ... expected_status=${user_cmd_status} |
| 578 | Verify IPMI Command ${random_username} ${valid_password} Operator |
| 579 | ... expected_status=${operator_cmd_status} |
| 580 | Verify IPMI Command ${random_username} ${valid_password} Administrator |
| 581 | ... expected_status=${admin_cmd_status} |
Rahul Maheshwari | c05bf56 | 2019-03-01 04:02:53 -0600 | [diff] [blame] | 582 | |
| 583 | |
| 584 | Verify IPMI Command |
| 585 | [Documentation] Verify IPMI command execution with given username, |
| 586 | ... password, privilege and expected status. |
Rahul Maheshwari | 8e17562 | 2019-05-20 05:30:32 -0500 | [diff] [blame] | 587 | [Arguments] ${username} ${password} ${privilege} ${channel}=${1} ${expected_status}=Passed |
Rahul Maheshwari | c05bf56 | 2019-03-01 04:02:53 -0600 | [diff] [blame] | 588 | # Description of argument(s): |
| 589 | # username The user name (e.g. "root", "robert", etc.). |
| 590 | # password The user password (e.g. "0penBmc", "0penBmc1", etc.). |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 591 | # privilege The session privilege for IPMI command (e.g. "User", "Operator", etc.). |
Rahul Maheshwari | 8e17562 | 2019-05-20 05:30:32 -0500 | [diff] [blame] | 592 | # channel The user channel number (e.g. "1" or "2"). |
Rahul Maheshwari | c05bf56 | 2019-03-01 04:02:53 -0600 | [diff] [blame] | 593 | # expected_status Expected status of IPMI command run with the user |
| 594 | # of above password and privilege (i.e. "Passed" or "Failed"). |
| 595 | |
| 596 | ${expected_rc}= Set Variable If '${expected_status}' == 'Passed' ${0} ${1} |
Rahul Maheshwari | ceb282e | 2019-09-16 00:11:41 -0500 | [diff] [blame] | 597 | Wait Until Keyword Succeeds 15 sec 5 sec Run IPMI Standard Command |
| 598 | ... sel info ${channel} expected_rc=${expected_rc} U=${username} P=${password} |
Rahul Maheshwari | c05bf56 | 2019-03-01 04:02:53 -0600 | [diff] [blame] | 599 | ... L=${privilege} |
| 600 | |
| 601 | |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 602 | Set User Password And Verify |
| 603 | [Documentation] Create a user and set its password with given length and option. |
| 604 | [Arguments] ${password_length} ${password_option} ${expected_result} |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 605 | [Teardown] Run Keyword Delete Created User ${random_userid} |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 606 | # Description of argument(s): |
| 607 | # password_length Length of password to be generated and used (e.g. "16"). |
| 608 | # password_option Password length option to be given in IPMI command (e.g. "16", "20"). |
| 609 | # expected_result Expected result for setting the user's password (e.g. "True", "False"). |
| 610 | |
| 611 | Rprint Vars password_length password_option expected_result |
| 612 | ${random_userid} ${random_username}= Create Random IPMI User |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 613 | Set Test Variable ${random_userid} |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 614 | ${password}= Get From Dictionary ${password_values} ${password_length} |
| 615 | Rprint Vars random_userid password |
| 616 | |
| 617 | # Set password for newly created user. |
| 618 | ${status}= Run Keyword And Return Status Run IPMI Standard Command |
| 619 | ... user set password ${random_userid} ${password} ${password_option} |
| 620 | Rprint Vars status |
| 621 | Valid Value status [${expected_result}] |
Anusha Dathatri | 7f81071 | 2020-01-07 04:13:16 -0600 | [diff] [blame] | 622 | Return From Keyword If '${expected_result}' == '${False}' |
Anusha Dathatri | dd8e7d8 | 2019-12-03 07:45:30 -0600 | [diff] [blame] | 623 | |
| 624 | # Set admin privilege and enable IPMI messaging for newly created user. |
| 625 | Set Channel Access ${random_userid} ipmi=on privilege=${admin_level_priv} |
| 626 | |
| 627 | # Delay added for user privilege to get set. |
| 628 | Sleep 5s |
| 629 | |
| 630 | Enable IPMI User And Verify ${random_userid} |
| 631 | |
| 632 | # For password_option 16, passwords with length between 17 and 20 will be truncated. |
| 633 | # For all other cases, passwords will be retained as it is to verify. |
| 634 | ${truncated_password}= Set Variable ${password[:${password_option}]} |
| 635 | Rprint Vars truncated_password |
| 636 | ${status}= Run Keyword And Return Status Verify IPMI Username And Password ${random_username} |
| 637 | ... ${truncated_password} |
| 638 | Rprint Vars status |
| 639 | Valid Value status [${expected_result}] |
| 640 | |
| 641 | |
Rahul Maheshwari | f646baa | 2019-02-20 12:29:35 -0600 | [diff] [blame] | 642 | Test Teardown Execution |
| 643 | [Documentation] Do the test teardown execution. |
| 644 | |
| 645 | FFDC On Test Case Fail |
Tony Lee | f9379e8 | 2020-01-08 18:20:38 +0800 | [diff] [blame] | 646 | |
| 647 | |
| 648 | Delete Created User |
| 649 | [Documentation] Delete created IPMI user. |
| 650 | [Arguments] ${userid} |
| 651 | # Description of argument(s): |
| 652 | # userid The user ID (e.g. "1", "2", etc.). |
| 653 | |
| 654 | Run IPMI Standard Command user set name ${userid} "" |
Ashwini Chandrappa | 5cefabf | 2021-08-30 23:48:14 -0500 | [diff] [blame] | 655 | Sleep 5s |