1d5bf3b06SRahul Maheshwari*** Settings *** 2d5bf3b06SRahul MaheshwariDocumentation Module for testing BMC via XCAT. 3d5bf3b06SRahul Maheshwari 4839a0c27SSandhya SomashekarResource ../lib/xcat/resource.robot 5d5bf3b06SRahul MaheshwariResource ../lib/xcat/xcat_utils.robot 6d5bf3b06SRahul MaheshwariResource ../lib/state_manager.robot 7d5bf3b06SRahul Maheshwari 8d5bf3b06SRahul MaheshwariLibrary OperatingSystem 9d5bf3b06SRahul MaheshwariLibrary String 10d5bf3b06SRahul Maheshwari 11d5bf3b06SRahul MaheshwariSuite Setup Test Suite Setup 12d5bf3b06SRahul Maheshwari 13d5bf3b06SRahul Maheshwari*** Variables *** 14d5bf3b06SRahul Maheshwari 15d5bf3b06SRahul Maheshwari*** Test Cases *** 16d5bf3b06SRahul Maheshwari 17d5bf3b06SRahul MaheshwariVerify Power On Via XCAT 18d5bf3b06SRahul Maheshwari [Documentation] Power on system via XCAT and verify using REST. 19d5bf3b06SRahul Maheshwari [Tags] Verify_Power_On_Via_XCAT 20d5bf3b06SRahul Maheshwari 21d5bf3b06SRahul Maheshwari Execute Command On XCAT rpower on 22d5bf3b06SRahul Maheshwari Wait Until Keyword Succeeds 10 min 10 sec Is Host Running 23d5bf3b06SRahul Maheshwari 24d5bf3b06SRahul Maheshwari 25d5bf3b06SRahul MaheshwariVerify Power Off Via XCAT 26d5bf3b06SRahul Maheshwari [Documentation] Power off system via XCAT and verify using REST. 27d5bf3b06SRahul Maheshwari [Tags] Verify_Power_Off_Via_XCAT 28d5bf3b06SRahul Maheshwari 29d5bf3b06SRahul Maheshwari Execute Command On XCAT rpower off 30d5bf3b06SRahul Maheshwari Wait Until Keyword Succeeds 6 min 10 sec Is Host Off 31d5bf3b06SRahul Maheshwari 32d5bf3b06SRahul Maheshwari 33*b98036a9SGeorge KeishingVerify BMC State Via XCAT 34d5bf3b06SRahul Maheshwari [Documentation] Verify BMC state using REST and XCAT. 35d5bf3b06SRahul Maheshwari [Tags] Verify_BMC_State_Via_XCAT 36d5bf3b06SRahul Maheshwari 37d5bf3b06SRahul Maheshwari ${xcat_resp}= Execute Command On XCAT rpower bmcstate 38d5bf3b06SRahul Maheshwari ${rest_resp}= Get BMC State 39d5bf3b06SRahul Maheshwari Should contain ${xcat_resp} ${rest_resp} 40d5bf3b06SRahul Maheshwari 41d5bf3b06SRahul Maheshwari 42d5bf3b06SRahul MaheshwariVerify Soft Power Off Followed With Power On 43d5bf3b06SRahul Maheshwari [Documentation] Verify soft power off system followed with power on. 44d5bf3b06SRahul Maheshwari [Tags] Verify_Soft_Power_Off_Followed_With_Power_On 45d5bf3b06SRahul Maheshwari [Setup] Initiate Host Boot 46d5bf3b06SRahul Maheshwari 47d5bf3b06SRahul Maheshwari Execute Command On XCAT rpower softoff 48d5bf3b06SRahul Maheshwari Wait Until Keyword Succeeds 6 min 10 sec Is Host Off 49d5bf3b06SRahul Maheshwari 50d5bf3b06SRahul Maheshwari Execute Command On XCAT rpower on 51d5bf3b06SRahul Maheshwari Wait Until Keyword Succeeds 10 min 10 sec Is Host Running 52d5bf3b06SRahul Maheshwari 53d5bf3b06SRahul Maheshwari 54d5bf3b06SRahul MaheshwariVerify Hard Power Off Followed With Power On 55d5bf3b06SRahul Maheshwari [Documentation] Verify hard power off system followed with power on. 56d5bf3b06SRahul Maheshwari [Tags] Verify_Hard_Power_Off_Followed_With_Power_On 57d5bf3b06SRahul Maheshwari [Setup] Initiate Host Boot 58d5bf3b06SRahul Maheshwari 59d5bf3b06SRahul Maheshwari Execute Command On XCAT rpower off 60d5bf3b06SRahul Maheshwari Wait Until Keyword Succeeds 6 min 10 sec Is Host Off 61d5bf3b06SRahul Maheshwari 62d5bf3b06SRahul Maheshwari Execute Command On XCAT rpower on 63d5bf3b06SRahul Maheshwari Wait Until Keyword Succeeds 10 min 10 sec Is Host Running 64d5bf3b06SRahul Maheshwari 65d5bf3b06SRahul Maheshwari 66d5bf3b06SRahul Maheshwari*** Keywords *** 67d5bf3b06SRahul Maheshwari 68d5bf3b06SRahul MaheshwariTest Suite Setup 69d5bf3b06SRahul Maheshwari [Documentation] Do the initial suite setup. 70d5bf3b06SRahul Maheshwari 71d5bf3b06SRahul Maheshwari Open Connection And Login To XCAT 72d5bf3b06SRahul Maheshwari 73d5bf3b06SRahul Maheshwari # Check if XCAT is installed. 74d5bf3b06SRahul Maheshwari ${cmd_output}= Execute Command ${XCAT_DIR_PATH}/lsxcatd -v 75d5bf3b06SRahul Maheshwari Should Not Be Empty ${cmd_output} msg=XCAT not installed. 76d5bf3b06SRahul Maheshwari 77d5bf3b06SRahul Maheshwari Add Nodes To XCAT ${OPENBMC_HOST} 78