Rahul Maheshwari | 8dd7ed8 | 2017-03-22 17:11:41 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Test reset reload functionality of BMC. |
| 4 | |
| 5 | Resource ../lib/rest_client.robot |
| 6 | Resource ../lib/state_manager.robot |
| 7 | Resource ../lib/openbmc_ffdc.robot |
| 8 | |
| 9 | Test Setup Open Connection And Log In |
| 10 | Test Teardown Post Testcase Execution |
| 11 | |
| 12 | *** Variables *** |
| 13 | |
| 14 | |
| 15 | *** Test Cases *** |
| 16 | |
| 17 | Verify Reset Reload With Chassis State On |
| 18 | [Documentation] Validate chassis "ON" state is unchanged after |
| 19 | ... reset reload. |
| 20 | [Tags] Verify_Reset_Reload_With_Chassis_State_On |
| 21 | |
| 22 | Initiate Host Boot |
| 23 | Wait Until Keyword Succeeds 5 min 10 sec Is Chassis On |
| 24 | ${chassis_state_before}= Run Keyword Get Chassis Power State |
| 25 | |
| 26 | Trigger Reset Reload via BMC Reboot |
| 27 | |
| 28 | ${chassis_state_after}= Run Keyword Get Chassis Power State |
| 29 | ${rr_status}= Run Keyword Check Reset Reload Status |
| 30 | |
| 31 | Should Be Equal ${chassis_state_before} ${chassis_state_after} |
| 32 | Should Be Equal ${rr_status} Yes |
| 33 | |
| 34 | |
| 35 | *** Keywords *** |
| 36 | |
| 37 | Check Reset Reload Status |
| 38 | [Documentation] Retuns reset reload status based on file presence. |
| 39 | |
| 40 | ${rr_status}= Execute Command On BMC |
| 41 | ... test -e /run/openbmc/chassis@0-on && echo "Yes" || echo "No" |
| 42 | [Return] ${rr_status} |
| 43 | |
| 44 | |
| 45 | Trigger Reset Reload via BMC Reboot |
| 46 | [Documentation] Initiate Reset reload using BMC Reboot. |
| 47 | |
| 48 | Initiate BMC Reboot |
| 49 | Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready |
| 50 | |
| 51 | |
| 52 | Post Testcase Execution |
| 53 | [Documentation] Do the post test teardown. |
| 54 | ... 1. Capture FFDC on test failure. |
| 55 | ... 2. Close all open SSH connections. |
| 56 | |
| 57 | FFDC On Test Case Fail |
| 58 | Close All Connections |