blob: 12e847227959048909adf157ec8ed4d6bdccfa74 [file] [log] [blame]
Rahul Maheshwarid5bf3b02017-07-31 00:07:47 -05001*** Settings ***
2Documentation Module for testing BMC via XCAT.
3
Sandhya Somashekar839a0c22019-01-31 05:05:43 -06004Resource ../lib/xcat/resource.robot
Rahul Maheshwarid5bf3b02017-07-31 00:07:47 -05005Resource ../lib/xcat/xcat_utils.robot
6Resource ../lib/state_manager.robot
7
8Library OperatingSystem
9Library String
10
11Suite Setup Test Suite Setup
12
Rahul Maheshwarid5bf3b02017-07-31 00:07:47 -050013*** Test Cases ***
14
15Verify 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 Maheshwarid5bf3b02017-07-31 00:07:47 -050022Verify 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 Keishingb98036a2022-01-31 12:39:47 -060029Verify BMC State Via XCAT
Rahul Maheshwarid5bf3b02017-07-31 00:07:47 -050030 [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 Keishing88f1f012025-04-16 23:44:10 +053035 Should Contain ${xcat_resp} ${rest_resp}
Rahul Maheshwarid5bf3b02017-07-31 00:07:47 -050036
37Verify 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 Maheshwarid5bf3b02017-07-31 00:07:47 -050048Verify 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 Maheshwarid5bf3b02017-07-31 00:07:47 -050059*** Keywords ***
60
61Test 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}