Sivas SRR | 6aa101f | 2019-02-19 22:31:55 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Test Redfish user account. |
| 3 | |
| 4 | Resource ../../lib/resource.robot |
| 5 | Resource ../../lib/bmc_redfish_resource.robot |
| 6 | Resource ../../lib/openbmc_ffdc.robot |
| 7 | |
| 8 | Test Setup Test Setup Execution |
| 9 | Test Teardown Test Teardown Execution |
| 10 | |
| 11 | |
| 12 | ** Test Cases ** |
| 13 | |
| 14 | Verify AccountService Available |
Sivas SRR | fa6831c | 2019-02-22 00:12:00 -0600 | [diff] [blame] | 15 | [Documentation] Verify Redfish account service is available. |
Sivas SRR | 6aa101f | 2019-02-19 22:31:55 -0600 | [diff] [blame] | 16 | [Tags] Verify_AccountService_Available |
| 17 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 18 | ${resp} = Redfish_utils.Get Attribute /redfish/v1/AccountService ServiceEnabled |
Sivas SRR | 6aa101f | 2019-02-19 22:31:55 -0600 | [diff] [blame] | 19 | Should Be Equal As Strings ${resp} ${True} |
| 20 | |
Sandhya Somashekar | 00f59cc | 2019-03-05 03:39:47 -0600 | [diff] [blame] | 21 | Redfish Create and Verify Users |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 22 | [Documentation] Create Redfish users with various roles. |
Sandhya Somashekar | 00f59cc | 2019-03-05 03:39:47 -0600 | [diff] [blame] | 23 | [Tags] Redfish_Create_and_Verify_Users |
| 24 | [Template] Redfish Create And Verify User |
| 25 | |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 26 | #username password role_id enabled |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 27 | admin_user TestPwd123 Administrator ${True} |
| 28 | operator_user TestPwd123 Operator ${True} |
| 29 | user_user TestPwd123 User ${True} |
| 30 | callback_user TestPwd123 Callback ${True} |
Sivas SRR | 6aa101f | 2019-02-19 22:31:55 -0600 | [diff] [blame] | 31 | |
Sandhya Somashekar | 33aa48c | 2019-03-13 05:54:49 -0500 | [diff] [blame] | 32 | Verify Redfish User with Wrong Password |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 33 | [Documentation] Verify Redfish User with Wrong Password. |
Sandhya Somashekar | 33aa48c | 2019-03-13 05:54:49 -0500 | [diff] [blame] | 34 | [Tags] Verify_Redfish_User_with_Wrong_Password |
| 35 | [Template] Verify Redfish User with Wrong Password |
| 36 | |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 37 | #username password role_id enabled wrong_password |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 38 | admin_user TestPwd123 Administrator ${True} alskjhfwurh |
| 39 | operator_user TestPwd123 Operator ${True} 12j8a8uakjhdaosiruf024 |
| 40 | user_user TestPwd123 User ${True} 12 |
| 41 | callback_user TestPwd123 Callback ${True} !#@D#RF#@!D |
Sandhya Somashekar | 33aa48c | 2019-03-13 05:54:49 -0500 | [diff] [blame] | 42 | |
Sandhya Somashekar | af402ca | 2019-03-18 05:59:19 -0500 | [diff] [blame] | 43 | Verify Login with Deleted Redfish Users |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 44 | [Documentation] Verify login with deleted Redfish Users. |
Sandhya Somashekar | af402ca | 2019-03-18 05:59:19 -0500 | [diff] [blame] | 45 | [Tags] Verify_Login_with_Deleted_Redfish_Users |
| 46 | [Template] Verify Login with Deleted Redfish User |
| 47 | |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 48 | #username password role_id enabled |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 49 | admin_user TestPwd123 Administrator ${True} |
| 50 | operator_user TestPwd123 Operator ${True} |
| 51 | user_user TestPwd123 User ${True} |
| 52 | callback_user TestPwd123 Callback ${True} |
Sandhya Somashekar | af402ca | 2019-03-18 05:59:19 -0500 | [diff] [blame] | 53 | |
George Keishing | e0c5ec3 | 2019-06-13 09:45:29 -0500 | [diff] [blame] | 54 | Verify User Creation Without Enabling It |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 55 | [Documentation] Verify User Creation Without Enabling it. |
George Keishing | e0c5ec3 | 2019-06-13 09:45:29 -0500 | [diff] [blame] | 56 | [Tags] Verify_User_Creation_Without_Enabling_It |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 57 | [Template] Verify Create User Without Enabling |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 58 | |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 59 | #username password role_id enabled |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 60 | admin_user TestPwd123 Administrator ${False} |
| 61 | operator_user TestPwd123 Operator ${False} |
| 62 | user_user TestPwd123 User ${False} |
| 63 | callback_user TestPwd123 Callback ${False} |
| 64 | |
| 65 | Verify Redfish User Persistence After Reboot |
| 66 | [Documentation] Verify Redfish user persistence after reboot. |
| 67 | [Tags] Verify_Redfish_User_Persistence_After_Reboot |
| 68 | |
| 69 | # Create Redfish users. |
| 70 | Redfish Create User admin_user TestPwd123 Administrator ${True} |
| 71 | Redfish Create User operator_user TestPwd123 Operator ${True} |
| 72 | Redfish Create User user_user TestPwd123 User ${True} |
| 73 | Redfish Create User callback_user TestPwd123 Callback ${True} |
| 74 | |
| 75 | # Reboot BMC. |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 76 | Redfish OBMC Reboot (off) stack_mode=normal |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 77 | |
| 78 | # Verify users after reboot. |
| 79 | Redfish Verify User admin_user TestPwd123 Administrator ${True} |
| 80 | Redfish Verify User operator_user TestPwd123 Operator ${True} |
| 81 | Redfish Verify User user_user TestPwd123 User ${True} |
| 82 | Redfish Verify User callback_user TestPwd123 Callback ${True} |
| 83 | |
| 84 | # Delete created users. |
Sandhya Somashekar | 8c5b249 | 2019-05-16 05:19:03 -0500 | [diff] [blame] | 85 | Redfish.Delete ${REDFISH_ACCOUNTS_URI}admin_user |
| 86 | Redfish.Delete ${REDFISH_ACCOUNTS_URI}operator_user |
| 87 | Redfish.Delete ${REDFISH_ACCOUNTS_URI}user_user |
| 88 | Redfish.Delete ${REDFISH_ACCOUNTS_URI}callback_user |
Sandhya Somashekar | 33aa48c | 2019-03-13 05:54:49 -0500 | [diff] [blame] | 89 | |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 90 | Verify User Creation With Invalid Role Id |
| 91 | [Documentation] Verify user creation with invalid role id. |
| 92 | [Tags] Verify_User_Creation_With_Invalid_Role_Id |
| 93 | |
| 94 | # Make sure the user account in question does not already exist. |
| 95 | Redfish.Delete ${REDFISH_ACCOUNTS_URI}test_user |
| 96 | ... valid_status_codes=[${HTTP_OK}, ${HTTP_NOT_FOUND}] |
| 97 | |
| 98 | # Create specified user. |
| 99 | ${payload}= Create Dictionary |
| 100 | ... UserName=test_user Password=TestPwd123 RoleId=wrongroleid Enabled=${True} |
| 101 | Redfish.Post ${REDFISH_ACCOUNTS_URI} body=&{payload} |
| 102 | ... valid_status_codes=[${HTTP_BAD_REQUEST}] |
| 103 | |
Sandhya Somashekar | 8c5b249 | 2019-05-16 05:19:03 -0500 | [diff] [blame] | 104 | Verify Error Upon Creating Same Users With Different Privileges |
| 105 | [Documentation] Verify error upon creating same users with different privileges. |
| 106 | [Tags] Verify_Error_Upon_Creating_Same_Users_With_Different_Privileges |
| 107 | |
| 108 | Redfish Create User test_user TestPwd123 Administrator ${True} |
| 109 | |
| 110 | # Create specified user. |
| 111 | ${payload}= Create Dictionary |
| 112 | ... UserName=test_user Password=TestPwd123 RoleId=Operator Enabled=${True} |
| 113 | Redfish.Post ${REDFISH_ACCOUNTS_URI} body=&{payload} |
| 114 | ... valid_status_codes=[${HTTP_BAD_REQUEST}] |
| 115 | |
| 116 | |
| 117 | Verify Modifying User Attributes |
| 118 | [Documentation] Verify modifying user attributes. |
| 119 | [Tags] Verify_Modifying_User_Attributes |
| 120 | |
| 121 | # Create Redfish users. |
| 122 | Redfish Create User admin_user TestPwd123 Administrator ${True} |
| 123 | Redfish Create User operator_user TestPwd123 Operator ${True} |
| 124 | Redfish Create User user_user TestPwd123 User ${True} |
| 125 | Redfish Create User callback_user TestPwd123 Callback ${True} |
| 126 | |
| 127 | Redfish.Login |
| 128 | |
| 129 | # Make sure the new user account does not already exist. |
| 130 | Redfish.Delete ${REDFISH_ACCOUNTS_URI}newadmin_user |
| 131 | ... valid_status_codes=[${HTTP_OK}, ${HTTP_NOT_FOUND}] |
| 132 | |
| 133 | # Update admin_user username using Redfish. |
| 134 | ${payload}= Create Dictionary UserName=newadmin_user |
| 135 | Redfish.Patch ${REDFISH_ACCOUNTS_URI}admin_user body=&{payload} |
| 136 | |
| 137 | # Update operator_user password using Redfish. |
| 138 | ${payload}= Create Dictionary Password=NewTestPwd123 |
| 139 | Redfish.Patch ${REDFISH_ACCOUNTS_URI}operator_user body=&{payload} |
| 140 | |
| 141 | # Update user_user role using Redfish. |
| 142 | ${payload}= Create Dictionary RoleId=Operator |
| 143 | Redfish.Patch ${REDFISH_ACCOUNTS_URI}user_user body=&{payload} |
| 144 | |
| 145 | # Update callback_user to disable using Redfish. |
| 146 | ${payload}= Create Dictionary Enabled=${False} |
| 147 | Redfish.Patch ${REDFISH_ACCOUNTS_URI}callback_user body=&{payload} |
| 148 | |
| 149 | # Verify users after updating |
| 150 | Redfish Verify User newadmin_user TestPwd123 Administrator ${True} |
| 151 | Redfish Verify User operator_user NewTestPwd123 Operator ${True} |
| 152 | Redfish Verify User user_user TestPwd123 Operator ${True} |
| 153 | Redfish Verify User callback_user TestPwd123 Callback ${False} |
| 154 | |
| 155 | # Delete created users. |
| 156 | Redfish.Delete ${REDFISH_ACCOUNTS_URI}newadmin_user |
| 157 | Redfish.Delete ${REDFISH_ACCOUNTS_URI}operator_user |
| 158 | Redfish.Delete ${REDFISH_ACCOUNTS_URI}user_user |
| 159 | Redfish.Delete ${REDFISH_ACCOUNTS_URI}callback_user |
| 160 | |
| 161 | |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 162 | |
Sivas SRR | 6aa101f | 2019-02-19 22:31:55 -0600 | [diff] [blame] | 163 | *** Keywords *** |
| 164 | |
| 165 | Test Setup Execution |
| 166 | [Documentation] Do test case setup tasks. |
| 167 | |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 168 | Redfish.Login |
Sivas SRR | 6aa101f | 2019-02-19 22:31:55 -0600 | [diff] [blame] | 169 | |
| 170 | |
| 171 | Test Teardown Execution |
| 172 | [Documentation] Do the post test teardown. |
| 173 | |
George Keishing | e0c5ec3 | 2019-06-13 09:45:29 -0500 | [diff] [blame] | 174 | #FFDC On Test Case Fail |
George Keishing | 97c9394 | 2019-03-04 12:45:07 -0600 | [diff] [blame] | 175 | Redfish.Logout |
Sandhya Somashekar | 00f59cc | 2019-03-05 03:39:47 -0600 | [diff] [blame] | 176 | |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 177 | Redfish Create User |
| 178 | [Documentation] Redfish create user. |
| 179 | [Arguments] ${username} ${password} ${role_id} ${enabled} |
| 180 | |
| 181 | # Description of argument(s): |
| 182 | # username The username to be created. |
| 183 | # password The password to be assigned. |
| 184 | # role_id The role id of the user to be created |
| 185 | # (e.g. "Administrator", "Operator", etc.). |
| 186 | # enabled Indicates whether the username being created |
| 187 | # should be enabled (${True}, ${False}). |
| 188 | |
Sandhya Somashekar | 8c5b249 | 2019-05-16 05:19:03 -0500 | [diff] [blame] | 189 | Redfish.Login |
| 190 | |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 191 | # Make sure the user account in question does not already exist. |
| 192 | Redfish.Delete ${REDFISH_ACCOUNTS_URI}${userName} |
| 193 | ... valid_status_codes=[${HTTP_OK}, ${HTTP_NOT_FOUND}] |
| 194 | |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 195 | # Create specified user. |
| 196 | ${payload}= Create Dictionary |
| 197 | ... UserName=${username} Password=${password} RoleId=${role_id} Enabled=${enabled} |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 198 | Redfish.Post ${REDFISH_ACCOUNTS_URI} body=&{payload} |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 199 | ... valid_status_codes=[${HTTP_CREATED}] |
| 200 | |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 201 | Redfish.Logout |
| 202 | |
| 203 | # Login with created user. |
| 204 | Run Keyword If ${enabled} == False |
| 205 | ... Run Keyword And Expect Error InvalidCredentialsError* |
| 206 | ... Redfish.Login ${username} ${password} |
| 207 | ... ELSE |
| 208 | ... Redfish.Login ${username} ${password} |
| 209 | |
| 210 | Run Keyword If ${enabled} == False |
| 211 | ... Redfish.Login |
| 212 | |
| 213 | # Validate Role Id of created user. |
| 214 | ${role_config}= Redfish_Utils.Get Attribute |
Sandhya Somashekar | 8c5b249 | 2019-05-16 05:19:03 -0500 | [diff] [blame] | 215 | ... ${REDFISH_ACCOUNTS_URI}${username} RoleId |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 216 | Should Be Equal ${role_id} ${role_config} |
| 217 | |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 218 | |
| 219 | Redfish Verify User |
| 220 | [Documentation] Redfish user verification. |
| 221 | [Arguments] ${username} ${password} ${role_id} ${enabled} |
| 222 | |
| 223 | # Description of argument(s): |
| 224 | # username The username to be created. |
| 225 | # password The password to be assigned. |
| 226 | # role_id The role id of the user to be created |
| 227 | # (e.g. "Administrator", "Operator", etc.). |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 228 | # enabled Indicates whether the username being created |
| 229 | # should be enabled (${True}, ${False}). |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 230 | |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 231 | # Trying to do a login with created user. |
| 232 | ${status}= Run Keyword And Return Status Redfish.Login ${username} ${password} |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 233 | |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 234 | # Doing a check of the returned status. |
| 235 | Should Be Equal ${status} ${enabled} |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 236 | |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 237 | # We do not need to login with created user (user could be in disabled status). |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 238 | Redfish.Login |
| 239 | |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 240 | # Validate Role Id of user. |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 241 | ${role_config}= Redfish_Utils.Get Attribute |
Sandhya Somashekar | 8c5b249 | 2019-05-16 05:19:03 -0500 | [diff] [blame] | 242 | ... ${REDFISH_ACCOUNTS_URI}${username} RoleId |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 243 | Should Be Equal ${role_id} ${role_config} |
| 244 | |
| 245 | |
Sandhya Somashekar | 00f59cc | 2019-03-05 03:39:47 -0600 | [diff] [blame] | 246 | Redfish Create And Verify User |
| 247 | [Documentation] Redfish create and verify user. |
| 248 | [Arguments] ${username} ${password} ${role_id} ${enabled} |
| 249 | |
| 250 | # Description of argument(s): |
Sandhya Somashekar | 33aa48c | 2019-03-13 05:54:49 -0500 | [diff] [blame] | 251 | # username The username to be created. |
| 252 | # password The password to be assigned. |
Sandhya Somashekar | af402ca | 2019-03-18 05:59:19 -0500 | [diff] [blame] | 253 | # role_id The role id of the user to be created |
| 254 | # (e.g. "Administrator", "Operator", etc.). |
| 255 | # enabled Indicates whether the username being created |
| 256 | # should be enabled (${True}, ${False}). |
Sandhya Somashekar | 00f59cc | 2019-03-05 03:39:47 -0600 | [diff] [blame] | 257 | |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 258 | # Example: |
| 259 | #{ |
| 260 | #"@odata.context": "/redfish/v1/$metadata#ManagerAccount.ManagerAccount", |
| 261 | #"@odata.id": "/redfish/v1/AccountService/Accounts/test1", |
| 262 | #"@odata.type": "#ManagerAccount.v1_0_3.ManagerAccount", |
| 263 | #"Description": "User Account", |
| 264 | #"Enabled": true, |
| 265 | #"Id": "test1", |
| 266 | #"Links": { |
| 267 | # "Role": { |
| 268 | # "@odata.id": "/redfish/v1/AccountService/Roles/Administrator" |
| 269 | # } |
| 270 | #}, |
| 271 | |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 272 | Redfish Create User ${username} ${password} ${role_id} ${enabled} |
Sandhya Somashekar | 00f59cc | 2019-03-05 03:39:47 -0600 | [diff] [blame] | 273 | |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 274 | Redfish Verify User ${username} ${password} ${role_id} ${enabled} |
Sandhya Somashekar | 00f59cc | 2019-03-05 03:39:47 -0600 | [diff] [blame] | 275 | |
| 276 | # Delete Specified User |
Sandhya Somashekar | 8c5b249 | 2019-05-16 05:19:03 -0500 | [diff] [blame] | 277 | Redfish.Delete ${REDFISH_ACCOUNTS_URI}${username} |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 278 | |
Sandhya Somashekar | 33aa48c | 2019-03-13 05:54:49 -0500 | [diff] [blame] | 279 | Verify Redfish User with Wrong Password |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 280 | [Documentation] Verify Redfish User with Wrong Password. |
Sandhya Somashekar | 33aa48c | 2019-03-13 05:54:49 -0500 | [diff] [blame] | 281 | [Arguments] ${username} ${password} ${role_id} ${enabled} ${wrong_password} |
| 282 | |
| 283 | # Description of argument(s): |
| 284 | # username The username to be created. |
| 285 | # password The password to be assigned. |
Sandhya Somashekar | af402ca | 2019-03-18 05:59:19 -0500 | [diff] [blame] | 286 | # role_id The role id of the user to be created |
| 287 | # (e.g. "Administrator", "Operator", etc.). |
| 288 | # enabled Indicates whether the username being created |
| 289 | # should be enabled (${True}, ${False}). |
Sandhya Somashekar | 33aa48c | 2019-03-13 05:54:49 -0500 | [diff] [blame] | 290 | # wrong_password Any invalid password. |
| 291 | |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 292 | Redfish Create User ${username} ${password} ${role_id} ${enabled} |
Sandhya Somashekar | 33aa48c | 2019-03-13 05:54:49 -0500 | [diff] [blame] | 293 | |
| 294 | # Attempt to login with created user with invalid password. |
| 295 | Run Keyword And Expect Error InvalidCredentialsError* |
| 296 | ... Redfish.Login ${username} ${wrong_password} |
| 297 | |
| 298 | Redfish.Login |
| 299 | |
| 300 | # Delete newly created user. |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 301 | Redfish.Delete ${REDFISH_ACCOUNTS_URI}${username} |
Sandhya Somashekar | 33aa48c | 2019-03-13 05:54:49 -0500 | [diff] [blame] | 302 | |
| 303 | |
Sandhya Somashekar | af402ca | 2019-03-18 05:59:19 -0500 | [diff] [blame] | 304 | Verify Login with Deleted Redfish User |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 305 | [Documentation] Verify Login with Deleted Redfish User. |
Sandhya Somashekar | af402ca | 2019-03-18 05:59:19 -0500 | [diff] [blame] | 306 | [Arguments] ${username} ${password} ${role_id} ${enabled} |
| 307 | |
| 308 | # Description of argument(s): |
| 309 | # username The username to be created. |
| 310 | # password The password to be assigned. |
| 311 | # role_id The role id of the user to be created |
| 312 | # (e.g. "Administrator", "Operator", etc.). |
| 313 | # enabled Indicates whether the username being created |
| 314 | # should be enabled (${True}, ${False}). |
| 315 | |
Sandhya Somashekar | aa280aa | 2019-04-01 04:15:06 -0500 | [diff] [blame] | 316 | Redfish Create User ${username} ${password} ${role_id} ${enabled} |
Sandhya Somashekar | e92b1e6 | 2019-04-25 05:27:45 -0500 | [diff] [blame] | 317 | ${status}= Run Keyword And Return Status Redfish.Login ${username} ${password} |
| 318 | |
| 319 | # Doing a check of the rerurned status |
| 320 | Should Be Equal ${status} ${True} |
| 321 | |
| 322 | Redfish.Login |
| 323 | |
| 324 | # Delete newly created user. |
| 325 | Redfish.Delete ${REDFISH_ACCOUNTS_URI}${userName} |
| 326 | |
| 327 | # Attempt to login with deleted user account. |
| 328 | Run Keyword And Expect Error InvalidCredentialsError* |
| 329 | ... Redfish.Login ${username} ${password} |
| 330 | |
| 331 | Redfish.Login |
| 332 | |
| 333 | Verify Create User Without Enabling |
| 334 | [Documentation] Verify Create User Without Enabling. |
| 335 | [Arguments] ${username} ${password} ${role_id} ${enabled} |
| 336 | |
| 337 | # Description of argument(s): |
| 338 | # username The username to be created. |
| 339 | # password The password to be assigned. |
| 340 | # role_id The role id of the user to be created |
| 341 | # (e.g. "Administrator", "Operator", etc.). |
| 342 | # enabled Indicates whether the username being created |
| 343 | # should be enabled (${True}, ${False}). |
| 344 | |
| 345 | Redfish.Login |
| 346 | |
| 347 | Redfish Create User ${username} ${password} ${role_id} ${enabled} |
| 348 | |
| 349 | Redfish.Logout |
| 350 | |
| 351 | # Login with created user. |
| 352 | Run Keyword And Expect Error InvalidCredentialsError* |
| 353 | ... Redfish.Login ${username} ${password} |
| 354 | |
| 355 | Redfish.Login |
Sandhya Somashekar | af402ca | 2019-03-18 05:59:19 -0500 | [diff] [blame] | 356 | |
| 357 | # Delete newly created user. |
Sandhya Somashekar | 8c5b249 | 2019-05-16 05:19:03 -0500 | [diff] [blame] | 358 | Redfish.Delete ${REDFISH_ACCOUNTS_URI}${username} |