George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Power cycle loop. This is to test where network service |
| 3 | ... becomes unavailable during AC-Cycle stress test. |
| 4 | |
| 5 | Resource ../lib/rest_client.robot |
| 6 | Resource ../lib/pdu/pdu.robot |
| 7 | Resource ../lib/utils.robot |
| 8 | Resource ../lib/openbmc_ffdc.robot |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 9 | Resource ../lib/state_manager.robot |
George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 10 | Resource ../lib/boot_utils.robot |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 11 | |
George Keishing | 94659a2 | 2017-11-17 00:03:05 -0600 | [diff] [blame] | 12 | Test Teardown Test Teardown Execution |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 13 | |
| 14 | *** Variables *** |
| 15 | ${LOOP_COUNT} ${50} |
| 16 | |
| 17 | *** Test Cases *** |
| 18 | |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 19 | Run Multiple Power Cycle |
| 20 | [Documentation] Execute multiple power cycles. |
| 21 | [Setup] Validate Parameters |
| 22 | [Tags] Run_Multiple_Power_Cycle |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 23 | |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 24 | # By default run test for 50 loops, else user input iteration. |
| 25 | # Fails immediately if any of the execution rounds fail and |
| 26 | # check if BMC is still pinging and FFDC is collected. |
| 27 | Repeat Keyword ${LOOP_COUNT} times Power Cycle System Via PDU |
| 28 | |
| 29 | |
George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 30 | Run Multiple BMC Reset Via REST |
| 31 | [Documentation] Execute multiple reboots via REST. |
| 32 | [Tags] Run_Multiple_BMC_Reset_Via_REST |
| 33 | |
| 34 | # By default run test for 50 loops, else user input iteration. |
| 35 | # Fails immediately if any of the execution rounds fail and |
| 36 | # check if BMC is still pinging and FFDC is collected. |
| 37 | Repeat Keyword ${LOOP_COUNT} times BMC REST Reset Cycle |
| 38 | |
| 39 | |
| 40 | Run Multiple BMC Reset Via Reboot |
| 41 | [Documentation] Execute multiple reboots via "reboot" command. |
| 42 | [Tags] Run_Multiple_BMC_Reset_Via_Reboot |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 43 | |
| 44 | # By default run test for 50 loops, else user input iteration. |
| 45 | # Fails immediately if any of the execution rounds fail and |
| 46 | # check if BMC is still pinging and FFDC is collected. |
| 47 | Repeat Keyword ${LOOP_COUNT} times BMC Reboot Cycle |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 48 | |
| 49 | |
| 50 | *** Keywords *** |
| 51 | |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 52 | Power Cycle System Via PDU |
| 53 | [Documentation] Power cycle system and wait for BMC to reach Ready state. |
| 54 | Log "Doing power cycle" |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 55 | PDU Power Cycle |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 56 | Check If BMC Is Up 5 min 10 sec |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 57 | |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 58 | Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready |
George Keishing | b39a679 | 2017-11-10 22:58:52 -0600 | [diff] [blame] | 59 | Verify BMC RTC And UTC Time Drift |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 60 | |
| 61 | |
George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 62 | BMC REST Reset Cycle |
| 63 | [Documentation] Reset BMC via REST and wait for ready state. |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 64 | Log "Doing Reboot cycle" |
George Keishing | 137882c | 2017-10-28 09:19:05 -0500 | [diff] [blame] | 65 | ${bmc_version_before}= Get BMC Version |
George Keishing | ca709b0 | 2017-02-02 11:38:19 -0600 | [diff] [blame] | 66 | Initiate BMC Reboot |
| 67 | Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready |
George Keishing | 137882c | 2017-10-28 09:19:05 -0500 | [diff] [blame] | 68 | ${bmc_version_after}= Get BMC Version |
| 69 | Should Be Equal ${bmc_version_before} ${bmc_version_after} |
George Keishing | b39a679 | 2017-11-10 22:58:52 -0600 | [diff] [blame] | 70 | Verify BMC RTC And UTC Time Drift |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 71 | |
| 72 | |
George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 73 | BMC Reboot Cycle |
| 74 | [Documentation] Reboot BMC and wait for ready state. |
| 75 | Log "Doing Reboot cycle" |
| 76 | ${bmc_version_before}= Get BMC Version |
| 77 | OBMC Reboot (off) stack_mode=normal |
| 78 | ${bmc_version_after}= Get BMC Version |
| 79 | Should Be Equal ${bmc_version_before} ${bmc_version_after} |
George Keishing | b39a679 | 2017-11-10 22:58:52 -0600 | [diff] [blame] | 80 | Verify BMC RTC And UTC Time Drift |
George Keishing | bf1500d | 2017-10-30 12:47:47 -0500 | [diff] [blame] | 81 | |
| 82 | |
George Keishing | 94659a2 | 2017-11-17 00:03:05 -0600 | [diff] [blame] | 83 | Test Teardown Execution |
| 84 | [Documentation] Do test case tear-down. |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 85 | Ping Host ${OPENBMC_HOST} |
Gunnar Mills | eac1af2 | 2016-11-14 15:30:09 -0600 | [diff] [blame] | 86 | FFDC On Test Case Fail |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 87 | |
| 88 | |
| 89 | Validate Parameters |
George Keishing | 94659a2 | 2017-11-17 00:03:05 -0600 | [diff] [blame] | 90 | [Documentation] Validate PDU parameters. |
George Keishing | 92abc99 | 2016-10-18 13:29:25 -0500 | [diff] [blame] | 91 | Should Not Be Empty ${PDU_IP} |
| 92 | Should Not Be Empty ${PDU_TYPE} |
| 93 | Should Not Be Empty ${PDU_SLOT_NO} |
| 94 | Should Not Be Empty ${PDU_USERNAME} |
| 95 | Should Not Be Empty ${PDU_PASSWORD} |
| 96 | |