Rahul Maheshwari | d5bf3b0 | 2017-07-31 00:07:47 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Module for testing BMC via XCAT. |
| 3 | |
Sandhya Somashekar | 839a0c2 | 2019-01-31 05:05:43 -0600 | [diff] [blame] | 4 | Resource ../lib/xcat/resource.robot |
Rahul Maheshwari | d5bf3b0 | 2017-07-31 00:07:47 -0500 | [diff] [blame] | 5 | Resource ../lib/xcat/xcat_utils.robot |
| 6 | Resource ../lib/state_manager.robot |
| 7 | |
| 8 | Library OperatingSystem |
| 9 | Library String |
| 10 | |
| 11 | Suite Setup Test Suite Setup |
| 12 | |
Rahul Maheshwari | d5bf3b0 | 2017-07-31 00:07:47 -0500 | [diff] [blame] | 13 | *** Test Cases *** |
| 14 | |
| 15 | Verify Power On Via XCAT |
| 16 | [Documentation] Power on system via XCAT and verify using REST. |
| 17 | [Tags] Verify_Power_On_Via_XCAT |
| 18 | |
| 19 | Execute Command On XCAT rpower on |
| 20 | Wait Until Keyword Succeeds 10 min 10 sec Is Host Running |
| 21 | |
Rahul Maheshwari | d5bf3b0 | 2017-07-31 00:07:47 -0500 | [diff] [blame] | 22 | Verify Power Off Via XCAT |
| 23 | [Documentation] Power off system via XCAT and verify using REST. |
| 24 | [Tags] Verify_Power_Off_Via_XCAT |
| 25 | |
| 26 | Execute Command On XCAT rpower off |
| 27 | Wait Until Keyword Succeeds 6 min 10 sec Is Host Off |
| 28 | |
George Keishing | b98036a | 2022-01-31 12:39:47 -0600 | [diff] [blame] | 29 | Verify BMC State Via XCAT |
Rahul Maheshwari | d5bf3b0 | 2017-07-31 00:07:47 -0500 | [diff] [blame] | 30 | [Documentation] Verify BMC state using REST and XCAT. |
| 31 | [Tags] Verify_BMC_State_Via_XCAT |
| 32 | |
| 33 | ${xcat_resp}= Execute Command On XCAT rpower bmcstate |
| 34 | ${rest_resp}= Get BMC State |
George Keishing | 88f1f01 | 2025-04-16 23:44:10 +0530 | [diff] [blame] | 35 | Should Contain ${xcat_resp} ${rest_resp} |
Rahul Maheshwari | d5bf3b0 | 2017-07-31 00:07:47 -0500 | [diff] [blame] | 36 | |
| 37 | Verify Soft Power Off Followed With Power On |
| 38 | [Documentation] Verify soft power off system followed with power on. |
| 39 | [Tags] Verify_Soft_Power_Off_Followed_With_Power_On |
| 40 | [Setup] Initiate Host Boot |
| 41 | |
| 42 | Execute Command On XCAT rpower softoff |
| 43 | Wait Until Keyword Succeeds 6 min 10 sec Is Host Off |
| 44 | |
| 45 | Execute Command On XCAT rpower on |
| 46 | Wait Until Keyword Succeeds 10 min 10 sec Is Host Running |
| 47 | |
Rahul Maheshwari | d5bf3b0 | 2017-07-31 00:07:47 -0500 | [diff] [blame] | 48 | Verify Hard Power Off Followed With Power On |
| 49 | [Documentation] Verify hard power off system followed with power on. |
| 50 | [Tags] Verify_Hard_Power_Off_Followed_With_Power_On |
| 51 | [Setup] Initiate Host Boot |
| 52 | |
| 53 | Execute Command On XCAT rpower off |
| 54 | Wait Until Keyword Succeeds 6 min 10 sec Is Host Off |
| 55 | |
| 56 | Execute Command On XCAT rpower on |
| 57 | Wait Until Keyword Succeeds 10 min 10 sec Is Host Running |
| 58 | |
Rahul Maheshwari | d5bf3b0 | 2017-07-31 00:07:47 -0500 | [diff] [blame] | 59 | *** Keywords *** |
| 60 | |
| 61 | Test Suite Setup |
| 62 | [Documentation] Do the initial suite setup. |
| 63 | |
| 64 | Open Connection And Login To XCAT |
| 65 | |
| 66 | # Check if XCAT is installed. |
| 67 | ${cmd_output}= Execute Command ${XCAT_DIR_PATH}/lsxcatd -v |
| 68 | Should Not Be Empty ${cmd_output} msg=XCAT not installed. |
| 69 | |
| 70 | Add Nodes To XCAT ${OPENBMC_HOST} |