| George Keishing | 74751f7 | 2018-10-09 13:46:27 -0500 | [diff] [blame] | 1 | *** Settings *** | 
 | 2 | Documentation   OEM IPMI in-band BMC authentication reset. | 
 | 3 |  | 
 | 4 | # This resets the BMC authentication: | 
 | 5 | # - Enable local users if they were disabled. | 
 | 6 | # - Delete the LDAP configuration if there was one. | 
 | 7 | # - Reset the root password back to the default one. | 
 | 8 |  | 
| Sandhya Somashekar | 839a0c2 | 2019-01-31 05:05:43 -0600 | [diff] [blame] | 9 | Resource        ../lib/resource.robot | 
| George Keishing | 74751f7 | 2018-10-09 13:46:27 -0500 | [diff] [blame] | 10 | Resource        ../lib/ipmi_client.robot | 
 | 11 | Resource        ../lib/boot_utils.robot | 
 | 12 | Library         ../lib/ipmi_utils.py | 
 | 13 |  | 
 | 14 | Test Teardown   FFDC On Test Case Fail | 
 | 15 |  | 
| Sridevi Ramesh | 8966617 | 2025-09-28 04:15:29 -0500 | [diff] [blame] | 16 | Test Tags       Test_Inband_BMC_Auth_Reset | 
 | 17 |  | 
| George Keishing | 74751f7 | 2018-10-09 13:46:27 -0500 | [diff] [blame] | 18 | *** Test Cases *** | 
 | 19 |  | 
 | 20 | Test Inband IPMI Auth Reset | 
 | 21 |     [Documentation]  Trigger in-band BMC authentication reset and verify. | 
 | 22 |     [Tags]  Test_Inband_IPMI_Auth_Reset | 
 | 23 |  | 
 | 24 |     Create Session  openbmc  ${AUTH_URI}  max_retries=1 | 
 | 25 |     ${headers}=  Create Dictionary  Content-Type=application/json | 
 | 26 |     @{credentials}=  Create List  ${OPENBMC_USERNAME}  ${OPENBMC_PASSWORD} | 
 | 27 |     ${data}=  create dictionary   data=@{credentials} | 
| George Keishing | fbd6700 | 2022-08-01 11:24:03 -0500 | [diff] [blame] | 28 |     ${resp}=  POST On Session  openbmc  /login  data=${data}  headers=${headers} | 
 | 29 |     ...  expected_status=any | 
| George Keishing | 74751f7 | 2018-10-09 13:46:27 -0500 | [diff] [blame] | 30 |     Should Be Equal As Strings  ${resp.status_code}  ${HTTP_UNAUTHORIZED} | 
 | 31 |  | 
 | 32 |     # Call reset method. | 
 | 33 |     Run Inband IPMI Raw Command  0x3a 0x11 | 
 | 34 |  | 
 | 35 |     Initialize OpenBMC |