blob: bec75ddd42876cbe3695fb14b61148d15d9511a6 [file] [log] [blame]
Sivas SRR6aa101f2019-02-19 22:31:55 -06001*** Settings ***
2Documentation Test Redfish user account.
3
4Resource ../../lib/resource.robot
5Resource ../../lib/bmc_redfish_resource.robot
6Resource ../../lib/openbmc_ffdc.robot
7
8Test Setup Test Setup Execution
9Test Teardown Test Teardown Execution
10
Sandhya Somashekar37122b62019-06-18 06:02:02 -050011*** Variables ***
12
13${account_lockout_duration} ${30}
14${account_lockout_threshold} ${3}
15
Sivas SRR6aa101f2019-02-19 22:31:55 -060016
17** Test Cases **
18
19Verify AccountService Available
Sivas SRRfa6831c2019-02-22 00:12:00 -060020 [Documentation] Verify Redfish account service is available.
Sivas SRR6aa101f2019-02-19 22:31:55 -060021 [Tags] Verify_AccountService_Available
22
George Keishing97c93942019-03-04 12:45:07 -060023 ${resp} = Redfish_utils.Get Attribute /redfish/v1/AccountService ServiceEnabled
Sivas SRR6aa101f2019-02-19 22:31:55 -060024 Should Be Equal As Strings ${resp} ${True}
25
Sandhya Somashekar00f59cc2019-03-05 03:39:47 -060026Redfish Create and Verify Users
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -050027 [Documentation] Create Redfish users with various roles.
Sandhya Somashekar00f59cc2019-03-05 03:39:47 -060028 [Tags] Redfish_Create_and_Verify_Users
29 [Template] Redfish Create And Verify User
30
Sandhya Somashekare92b1e62019-04-25 05:27:45 -050031 #username password role_id enabled
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -050032 admin_user TestPwd123 Administrator ${True}
33 operator_user TestPwd123 Operator ${True}
34 user_user TestPwd123 User ${True}
35 callback_user TestPwd123 Callback ${True}
Sivas SRR6aa101f2019-02-19 22:31:55 -060036
Sandhya Somashekar33aa48c2019-03-13 05:54:49 -050037Verify Redfish User with Wrong Password
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -050038 [Documentation] Verify Redfish User with Wrong Password.
Sandhya Somashekar33aa48c2019-03-13 05:54:49 -050039 [Tags] Verify_Redfish_User_with_Wrong_Password
40 [Template] Verify Redfish User with Wrong Password
41
Sandhya Somashekare92b1e62019-04-25 05:27:45 -050042 #username password role_id enabled wrong_password
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -050043 admin_user TestPwd123 Administrator ${True} alskjhfwurh
44 operator_user TestPwd123 Operator ${True} 12j8a8uakjhdaosiruf024
45 user_user TestPwd123 User ${True} 12
46 callback_user TestPwd123 Callback ${True} !#@D#RF#@!D
Sandhya Somashekar33aa48c2019-03-13 05:54:49 -050047
Sandhya Somashekaraf402ca2019-03-18 05:59:19 -050048Verify Login with Deleted Redfish Users
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -050049 [Documentation] Verify login with deleted Redfish Users.
Sandhya Somashekaraf402ca2019-03-18 05:59:19 -050050 [Tags] Verify_Login_with_Deleted_Redfish_Users
51 [Template] Verify Login with Deleted Redfish User
52
Sandhya Somashekare92b1e62019-04-25 05:27:45 -050053 #username password role_id enabled
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -050054 admin_user TestPwd123 Administrator ${True}
55 operator_user TestPwd123 Operator ${True}
56 user_user TestPwd123 User ${True}
57 callback_user TestPwd123 Callback ${True}
Sandhya Somashekaraf402ca2019-03-18 05:59:19 -050058
George Keishinge0c5ec32019-06-13 09:45:29 -050059Verify User Creation Without Enabling It
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -050060 [Documentation] Verify User Creation Without Enabling it.
George Keishinge0c5ec32019-06-13 09:45:29 -050061 [Tags] Verify_User_Creation_Without_Enabling_It
Sandhya Somashekare92b1e62019-04-25 05:27:45 -050062 [Template] Verify Create User Without Enabling
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -050063
Sandhya Somashekare92b1e62019-04-25 05:27:45 -050064 #username password role_id enabled
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -050065 admin_user TestPwd123 Administrator ${False}
66 operator_user TestPwd123 Operator ${False}
67 user_user TestPwd123 User ${False}
68 callback_user TestPwd123 Callback ${False}
69
70Verify Redfish User Persistence After Reboot
71 [Documentation] Verify Redfish user persistence after reboot.
72 [Tags] Verify_Redfish_User_Persistence_After_Reboot
73
74 # Create Redfish users.
75 Redfish Create User admin_user TestPwd123 Administrator ${True}
76 Redfish Create User operator_user TestPwd123 Operator ${True}
77 Redfish Create User user_user TestPwd123 User ${True}
78 Redfish Create User callback_user TestPwd123 Callback ${True}
79
80 # Reboot BMC.
Sandhya Somashekare92b1e62019-04-25 05:27:45 -050081 Redfish OBMC Reboot (off) stack_mode=normal
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -050082
83 # Verify users after reboot.
84 Redfish Verify User admin_user TestPwd123 Administrator ${True}
85 Redfish Verify User operator_user TestPwd123 Operator ${True}
86 Redfish Verify User user_user TestPwd123 User ${True}
87 Redfish Verify User callback_user TestPwd123 Callback ${True}
88
89 # Delete created users.
Sandhya Somashekar8c5b2492019-05-16 05:19:03 -050090 Redfish.Delete ${REDFISH_ACCOUNTS_URI}admin_user
91 Redfish.Delete ${REDFISH_ACCOUNTS_URI}operator_user
92 Redfish.Delete ${REDFISH_ACCOUNTS_URI}user_user
93 Redfish.Delete ${REDFISH_ACCOUNTS_URI}callback_user
Sandhya Somashekar33aa48c2019-03-13 05:54:49 -050094
Sandhya Somashekare92b1e62019-04-25 05:27:45 -050095Verify User Creation With Invalid Role Id
Sandhya Somashekard7d46c02019-06-26 05:10:25 -050096 [Documentation] Verify user creation with invalid role ID.
Sandhya Somashekare92b1e62019-04-25 05:27:45 -050097 [Tags] Verify_User_Creation_With_Invalid_Role_Id
98
99 # Make sure the user account in question does not already exist.
100 Redfish.Delete ${REDFISH_ACCOUNTS_URI}test_user
101 ... valid_status_codes=[${HTTP_OK}, ${HTTP_NOT_FOUND}]
102
103 # Create specified user.
104 ${payload}= Create Dictionary
105 ... UserName=test_user Password=TestPwd123 RoleId=wrongroleid Enabled=${True}
106 Redfish.Post ${REDFISH_ACCOUNTS_URI} body=&{payload}
107 ... valid_status_codes=[${HTTP_BAD_REQUEST}]
108
Sandhya Somashekar8c5b2492019-05-16 05:19:03 -0500109Verify Error Upon Creating Same Users With Different Privileges
110 [Documentation] Verify error upon creating same users with different privileges.
111 [Tags] Verify_Error_Upon_Creating_Same_Users_With_Different_Privileges
112
113 Redfish Create User test_user TestPwd123 Administrator ${True}
114
115 # Create specified user.
116 ${payload}= Create Dictionary
117 ... UserName=test_user Password=TestPwd123 RoleId=Operator Enabled=${True}
118 Redfish.Post ${REDFISH_ACCOUNTS_URI} body=&{payload}
119 ... valid_status_codes=[${HTTP_BAD_REQUEST}]
120
121
122Verify Modifying User Attributes
123 [Documentation] Verify modifying user attributes.
124 [Tags] Verify_Modifying_User_Attributes
125
126 # Create Redfish users.
127 Redfish Create User admin_user TestPwd123 Administrator ${True}
128 Redfish Create User operator_user TestPwd123 Operator ${True}
129 Redfish Create User user_user TestPwd123 User ${True}
130 Redfish Create User callback_user TestPwd123 Callback ${True}
131
132 Redfish.Login
133
134 # Make sure the new user account does not already exist.
135 Redfish.Delete ${REDFISH_ACCOUNTS_URI}newadmin_user
136 ... valid_status_codes=[${HTTP_OK}, ${HTTP_NOT_FOUND}]
137
138 # Update admin_user username using Redfish.
139 ${payload}= Create Dictionary UserName=newadmin_user
140 Redfish.Patch ${REDFISH_ACCOUNTS_URI}admin_user body=&{payload}
141
142 # Update operator_user password using Redfish.
143 ${payload}= Create Dictionary Password=NewTestPwd123
144 Redfish.Patch ${REDFISH_ACCOUNTS_URI}operator_user body=&{payload}
145
146 # Update user_user role using Redfish.
147 ${payload}= Create Dictionary RoleId=Operator
148 Redfish.Patch ${REDFISH_ACCOUNTS_URI}user_user body=&{payload}
149
150 # Update callback_user to disable using Redfish.
151 ${payload}= Create Dictionary Enabled=${False}
152 Redfish.Patch ${REDFISH_ACCOUNTS_URI}callback_user body=&{payload}
153
154 # Verify users after updating
155 Redfish Verify User newadmin_user TestPwd123 Administrator ${True}
156 Redfish Verify User operator_user NewTestPwd123 Operator ${True}
157 Redfish Verify User user_user TestPwd123 Operator ${True}
158 Redfish Verify User callback_user TestPwd123 Callback ${False}
159
160 # Delete created users.
161 Redfish.Delete ${REDFISH_ACCOUNTS_URI}newadmin_user
162 Redfish.Delete ${REDFISH_ACCOUNTS_URI}operator_user
163 Redfish.Delete ${REDFISH_ACCOUNTS_URI}user_user
164 Redfish.Delete ${REDFISH_ACCOUNTS_URI}callback_user
165
Sandhya Somashekar37122b62019-06-18 06:02:02 -0500166Verify User Account Locked
167 [Documentation] Verify user account locked upon trying with invalid password.
168 [Tags] Verify_User_Account_Locked
169
170 Redfish Create User admin_user TestPwd123 Administrator ${True}
171
172 Redfish.Patch ${REDFISH_ACCOUNTS_SERVICE_URI}
173 ... body={'AccountLockoutThreshold': ${account_lockout_threshold}, 'AccountLockoutDuration': ${account_lockout_duration}}
174
175 # Make ${account_lockout_threshold} failed login attempts.
176 Repeat Keyword ${account_lockout_threshold} times
177 ... Run Keyword And Expect Error InvalidCredentialsError* Redfish.Login admin_user abc123
178
179 # Verify that legitimate login fails due to lockout.
180 Run Keyword And Expect Error InvalidCredentialsError*
181 ... Redfish.Login admin_user TestPwd123
182
183 # Wait for lockout duration to expire and then verify that login works.
184 Sleep ${account_lockout_duration}s
185 Redfish.Login admin_user TestPwd123
186
187 Redfish.Logout
Sandhya Somashekar8c5b2492019-05-16 05:19:03 -0500188
Sandhya Somashekard7d46c02019-06-26 05:10:25 -0500189Verify Admin User Privilege
190 [Documentation] Verify admin user privilege.
191 [Tags] Verify_Admin_User_Privilege
192
193 Redfish Create User admin_user TestPwd123 Administrator ${True}
194 Redfish Create User operator_user TestPwd123 Operator ${True}
195 Redfish Create User user_user TestPwd123 User ${True}
196
197 # Change role ID of operator user with admin user.
198 # Login with admin user.
199 Redfish.Login admin_user TestPwd123
200
201 # Modify Role ID of Operator user.
202 Redfish.Patch ${REDFISH_ACCOUNTS_URI}operator_user body={'RoleId': 'Administrator'}
203
204 # Verify modified user.
205 Redfish Verify User operator_user TestPwd123 Administrator ${True}
206
207 # Change password of 'user' user with admin user.
208 Redfish.Patch ${REDFISH_ACCOUNTS_URI}user_user body={'Password': 'NewTestPwd123'}
209
210 # Verify modified user.
211 Redfish Verify User user_user NewTestPwd123 User ${True}
212
213Verify Operator User Privilege
214 [Documentation] Verify operator user privilege.
215 [Tags] Verify_operator_User_Privilege
216
217 Redfish Create User admin_user TestPwd123 Administrator ${True}
218 Redfish Create User operator_user TestPwd123 Operator ${True}
219
220 # Login with operator user.
221 Redfish.Login operator_user TestPwd123
222
223 # Verify power on system.
224 Redfish OBMC Reboot (off) stack_mode=normal
225
226 # Attempt to change password of admin user with operator user.
227 Redfish.Patch ${REDFISH_ACCOUNTS_URI}admin_user body={'Password': 'NewTestPwd123'}
228 ... valid_status_codes=[${HTTP_UNAUTHORIZED}]
229
230Verify 'User' User Privilege
231 [Documentation] Verify 'user' user privilege.
232 [Tags] Verify_User_User_Privilege
233
234 Redfish Create User user_user TestPwd123 User ${True}
235
236 # Read system level data.
237 ${system_model}= Redfish_Utils.Get Attribute
238 ... ${SYSTEM_BASE_URI} Model
239
Sandhya Somashekare92b1e62019-04-25 05:27:45 -0500240
Sivas SRR6aa101f2019-02-19 22:31:55 -0600241*** Keywords ***
242
243Test Setup Execution
244 [Documentation] Do test case setup tasks.
245
George Keishing97c93942019-03-04 12:45:07 -0600246 Redfish.Login
Sivas SRR6aa101f2019-02-19 22:31:55 -0600247
248
249Test Teardown Execution
250 [Documentation] Do the post test teardown.
251
Sandhya Somashekar37122b62019-06-18 06:02:02 -0500252 FFDC On Test Case Fail
George Keishing97c93942019-03-04 12:45:07 -0600253 Redfish.Logout
Sandhya Somashekar00f59cc2019-03-05 03:39:47 -0600254
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500255Redfish Create User
256 [Documentation] Redfish create user.
257 [Arguments] ${username} ${password} ${role_id} ${enabled}
258
259 # Description of argument(s):
260 # username The username to be created.
261 # password The password to be assigned.
Sandhya Somashekard7d46c02019-06-26 05:10:25 -0500262 # role_id The role ID of the user to be created
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500263 # (e.g. "Administrator", "Operator", etc.).
264 # enabled Indicates whether the username being created
265 # should be enabled (${True}, ${False}).
266
Sandhya Somashekar8c5b2492019-05-16 05:19:03 -0500267 Redfish.Login
268
Sandhya Somashekare92b1e62019-04-25 05:27:45 -0500269 # Make sure the user account in question does not already exist.
270 Redfish.Delete ${REDFISH_ACCOUNTS_URI}${userName}
271 ... valid_status_codes=[${HTTP_OK}, ${HTTP_NOT_FOUND}]
272
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500273 # Create specified user.
274 ${payload}= Create Dictionary
275 ... UserName=${username} Password=${password} RoleId=${role_id} Enabled=${enabled}
Sandhya Somashekare92b1e62019-04-25 05:27:45 -0500276 Redfish.Post ${REDFISH_ACCOUNTS_URI} body=&{payload}
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500277 ... valid_status_codes=[${HTTP_CREATED}]
278
Sandhya Somashekare92b1e62019-04-25 05:27:45 -0500279 Redfish.Logout
280
281 # Login with created user.
282 Run Keyword If ${enabled} == False
283 ... Run Keyword And Expect Error InvalidCredentialsError*
284 ... Redfish.Login ${username} ${password}
285 ... ELSE
286 ... Redfish.Login ${username} ${password}
287
288 Run Keyword If ${enabled} == False
289 ... Redfish.Login
290
Sandhya Somashekard7d46c02019-06-26 05:10:25 -0500291 # Validate Role ID of created user.
Sandhya Somashekare92b1e62019-04-25 05:27:45 -0500292 ${role_config}= Redfish_Utils.Get Attribute
Sandhya Somashekar8c5b2492019-05-16 05:19:03 -0500293 ... ${REDFISH_ACCOUNTS_URI}${username} RoleId
Sandhya Somashekare92b1e62019-04-25 05:27:45 -0500294 Should Be Equal ${role_id} ${role_config}
295
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500296
297Redfish Verify User
298 [Documentation] Redfish user verification.
299 [Arguments] ${username} ${password} ${role_id} ${enabled}
300
301 # Description of argument(s):
302 # username The username to be created.
303 # password The password to be assigned.
Sandhya Somashekard7d46c02019-06-26 05:10:25 -0500304 # role_id The role ID of the user to be created
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500305 # (e.g. "Administrator", "Operator", etc.).
Sandhya Somashekare92b1e62019-04-25 05:27:45 -0500306 # enabled Indicates whether the username being created
307 # should be enabled (${True}, ${False}).
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500308
Sandhya Somashekare92b1e62019-04-25 05:27:45 -0500309 # Trying to do a login with created user.
310 ${status}= Run Keyword And Return Status Redfish.Login ${username} ${password}
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500311
Sandhya Somashekare92b1e62019-04-25 05:27:45 -0500312 # Doing a check of the returned status.
313 Should Be Equal ${status} ${enabled}
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500314
Sandhya Somashekare92b1e62019-04-25 05:27:45 -0500315 # We do not need to login with created user (user could be in disabled status).
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500316 Redfish.Login
317
Sandhya Somashekare92b1e62019-04-25 05:27:45 -0500318 # Validate Role Id of user.
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500319 ${role_config}= Redfish_Utils.Get Attribute
Sandhya Somashekar8c5b2492019-05-16 05:19:03 -0500320 ... ${REDFISH_ACCOUNTS_URI}${username} RoleId
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500321 Should Be Equal ${role_id} ${role_config}
322
323
Sandhya Somashekar00f59cc2019-03-05 03:39:47 -0600324Redfish Create And Verify User
325 [Documentation] Redfish create and verify user.
326 [Arguments] ${username} ${password} ${role_id} ${enabled}
327
328 # Description of argument(s):
Sandhya Somashekar33aa48c2019-03-13 05:54:49 -0500329 # username The username to be created.
330 # password The password to be assigned.
Sandhya Somashekard7d46c02019-06-26 05:10:25 -0500331 # role_id The role ID of the user to be created
Sandhya Somashekaraf402ca2019-03-18 05:59:19 -0500332 # (e.g. "Administrator", "Operator", etc.).
333 # enabled Indicates whether the username being created
334 # should be enabled (${True}, ${False}).
Sandhya Somashekar00f59cc2019-03-05 03:39:47 -0600335
Sandhya Somashekare92b1e62019-04-25 05:27:45 -0500336 # Example:
337 #{
338 #"@odata.context": "/redfish/v1/$metadata#ManagerAccount.ManagerAccount",
339 #"@odata.id": "/redfish/v1/AccountService/Accounts/test1",
340 #"@odata.type": "#ManagerAccount.v1_0_3.ManagerAccount",
341 #"Description": "User Account",
342 #"Enabled": true,
343 #"Id": "test1",
344 #"Links": {
345 # "Role": {
346 # "@odata.id": "/redfish/v1/AccountService/Roles/Administrator"
347 # }
348 #},
349
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500350 Redfish Create User ${username} ${password} ${role_id} ${enabled}
Sandhya Somashekar00f59cc2019-03-05 03:39:47 -0600351
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500352 Redfish Verify User ${username} ${password} ${role_id} ${enabled}
Sandhya Somashekar00f59cc2019-03-05 03:39:47 -0600353
354 # Delete Specified User
Sandhya Somashekar8c5b2492019-05-16 05:19:03 -0500355 Redfish.Delete ${REDFISH_ACCOUNTS_URI}${username}
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500356
Sandhya Somashekar33aa48c2019-03-13 05:54:49 -0500357Verify Redfish User with Wrong Password
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500358 [Documentation] Verify Redfish User with Wrong Password.
Sandhya Somashekar33aa48c2019-03-13 05:54:49 -0500359 [Arguments] ${username} ${password} ${role_id} ${enabled} ${wrong_password}
360
361 # Description of argument(s):
362 # username The username to be created.
363 # password The password to be assigned.
Sandhya Somashekard7d46c02019-06-26 05:10:25 -0500364 # role_id The role ID of the user to be created
Sandhya Somashekaraf402ca2019-03-18 05:59:19 -0500365 # (e.g. "Administrator", "Operator", etc.).
366 # enabled Indicates whether the username being created
367 # should be enabled (${True}, ${False}).
Sandhya Somashekar33aa48c2019-03-13 05:54:49 -0500368 # wrong_password Any invalid password.
369
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500370 Redfish Create User ${username} ${password} ${role_id} ${enabled}
Sandhya Somashekar33aa48c2019-03-13 05:54:49 -0500371
372 # Attempt to login with created user with invalid password.
373 Run Keyword And Expect Error InvalidCredentialsError*
374 ... Redfish.Login ${username} ${wrong_password}
375
376 Redfish.Login
377
378 # Delete newly created user.
Sandhya Somashekare92b1e62019-04-25 05:27:45 -0500379 Redfish.Delete ${REDFISH_ACCOUNTS_URI}${username}
Sandhya Somashekar33aa48c2019-03-13 05:54:49 -0500380
381
Sandhya Somashekaraf402ca2019-03-18 05:59:19 -0500382Verify Login with Deleted Redfish User
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500383 [Documentation] Verify Login with Deleted Redfish User.
Sandhya Somashekaraf402ca2019-03-18 05:59:19 -0500384 [Arguments] ${username} ${password} ${role_id} ${enabled}
385
386 # Description of argument(s):
387 # username The username to be created.
388 # password The password to be assigned.
Sandhya Somashekard7d46c02019-06-26 05:10:25 -0500389 # role_id The role ID of the user to be created
Sandhya Somashekaraf402ca2019-03-18 05:59:19 -0500390 # (e.g. "Administrator", "Operator", etc.).
391 # enabled Indicates whether the username being created
392 # should be enabled (${True}, ${False}).
393
Sandhya Somashekaraa280aa2019-04-01 04:15:06 -0500394 Redfish Create User ${username} ${password} ${role_id} ${enabled}
Sandhya Somashekare92b1e62019-04-25 05:27:45 -0500395 ${status}= Run Keyword And Return Status Redfish.Login ${username} ${password}
396
397 # Doing a check of the rerurned status
398 Should Be Equal ${status} ${True}
399
400 Redfish.Login
401
402 # Delete newly created user.
403 Redfish.Delete ${REDFISH_ACCOUNTS_URI}${userName}
404
405 # Attempt to login with deleted user account.
406 Run Keyword And Expect Error InvalidCredentialsError*
407 ... Redfish.Login ${username} ${password}
408
409 Redfish.Login
410
411Verify Create User Without Enabling
412 [Documentation] Verify Create User Without Enabling.
413 [Arguments] ${username} ${password} ${role_id} ${enabled}
414
415 # Description of argument(s):
416 # username The username to be created.
417 # password The password to be assigned.
Sandhya Somashekard7d46c02019-06-26 05:10:25 -0500418 # role_id The role ID of the user to be created
Sandhya Somashekare92b1e62019-04-25 05:27:45 -0500419 # (e.g. "Administrator", "Operator", etc.).
420 # enabled Indicates whether the username being created
421 # should be enabled (${True}, ${False}).
422
423 Redfish.Login
424
425 Redfish Create User ${username} ${password} ${role_id} ${enabled}
426
427 Redfish.Logout
428
429 # Login with created user.
430 Run Keyword And Expect Error InvalidCredentialsError*
431 ... Redfish.Login ${username} ${password}
432
433 Redfish.Login
Sandhya Somashekaraf402ca2019-03-18 05:59:19 -0500434
435 # Delete newly created user.
Sandhya Somashekar8c5b2492019-05-16 05:19:03 -0500436 Redfish.Delete ${REDFISH_ACCOUNTS_URI}${username}