blob: adf9bfc3bd0602898218c78e5ca83fcf4de104fa [file] [log] [blame]
George Keishing92abc992016-10-18 13:29:25 -05001*** Settings ***
2Documentation Power cycle loop. This is to test where network service
3... becomes unavailable during AC-Cycle stress test.
4
5Resource ../lib/rest_client.robot
6Resource ../lib/pdu/pdu.robot
7Resource ../lib/utils.robot
8Resource ../lib/openbmc_ffdc.robot
George Keishingca709b02017-02-02 11:38:19 -06009Resource ../lib/state_manager.robot
George Keishingbf1500d2017-10-30 12:47:47 -050010Resource ../lib/boot_utils.robot
George Keishing92abc992016-10-18 13:29:25 -050011
George Keishing92abc992016-10-18 13:29:25 -050012Test Teardown Test Exit Logs
13
14*** Variables ***
15${LOOP_COUNT} ${50}
16
17*** Test Cases ***
18
George Keishingca709b02017-02-02 11:38:19 -060019Run Multiple Power Cycle
20 [Documentation] Execute multiple power cycles.
21 [Setup] Validate Parameters
22 [Tags] Run_Multiple_Power_Cycle
George Keishing92abc992016-10-18 13:29:25 -050023
George Keishingca709b02017-02-02 11:38:19 -060024 # 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 Keishingbf1500d2017-10-30 12:47:47 -050030Run 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
40Run Multiple BMC Reset Via Reboot
41 [Documentation] Execute multiple reboots via "reboot" command.
42 [Tags] Run_Multiple_BMC_Reset_Via_Reboot
George Keishingca709b02017-02-02 11:38:19 -060043
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 Keishing92abc992016-10-18 13:29:25 -050048
49
50*** Keywords ***
51
George Keishingca709b02017-02-02 11:38:19 -060052Power Cycle System Via PDU
53 [Documentation] Power cycle system and wait for BMC to reach Ready state.
54 Log "Doing power cycle"
George Keishing92abc992016-10-18 13:29:25 -050055 PDU Power Cycle
George Keishingca709b02017-02-02 11:38:19 -060056 Check If BMC Is Up 5 min 10 sec
George Keishing92abc992016-10-18 13:29:25 -050057
George Keishingca709b02017-02-02 11:38:19 -060058 Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready
59
60
George Keishingbf1500d2017-10-30 12:47:47 -050061BMC REST Reset Cycle
62 [Documentation] Reset BMC via REST and wait for ready state.
George Keishingca709b02017-02-02 11:38:19 -060063 Log "Doing Reboot cycle"
George Keishing137882c2017-10-28 09:19:05 -050064 ${bmc_version_before}= Get BMC Version
George Keishingca709b02017-02-02 11:38:19 -060065 Initiate BMC Reboot
66 Wait Until Keyword Succeeds 10 min 10 sec Is BMC Ready
George Keishing137882c2017-10-28 09:19:05 -050067 ${bmc_version_after}= Get BMC Version
68 Should Be Equal ${bmc_version_before} ${bmc_version_after}
George Keishing92abc992016-10-18 13:29:25 -050069
70
George Keishingbf1500d2017-10-30 12:47:47 -050071BMC Reboot Cycle
72 [Documentation] Reboot BMC and wait for ready state.
73 Log "Doing Reboot cycle"
74 ${bmc_version_before}= Get BMC Version
75 OBMC Reboot (off) stack_mode=normal
76 ${bmc_version_after}= Get BMC Version
77 Should Be Equal ${bmc_version_before} ${bmc_version_after}
78
79
George Keishing92abc992016-10-18 13:29:25 -050080Test Exit Logs
81 Ping Host ${OPENBMC_HOST}
Gunnar Millseac1af22016-11-14 15:30:09 -060082 FFDC On Test Case Fail
George Keishing92abc992016-10-18 13:29:25 -050083
84
85Validate Parameters
86 Should Not Be Empty ${PDU_IP}
87 Should Not Be Empty ${PDU_TYPE}
88 Should Not Be Empty ${PDU_SLOT_NO}
89 Should Not Be Empty ${PDU_USERNAME}
90 Should Not Be Empty ${PDU_PASSWORD}
91