blob: 7af7e87670089df943aa31c82099e76237c12e05 [file] [log] [blame]
Sridevi Rameshd737eb92019-02-13 05:03:21 -06001*** Settings ***
George Keishing4583a082019-02-25 10:28:42 -06002Documentation This suite tests Redfish Host power operations.
3
Sridevi Rameshd737eb92019-02-13 05:03:21 -06004Resource ../../lib/boot_utils.robot
George Keishing36c39aa2019-03-01 04:33:58 -06005Resource ../../lib/common_utils.robot
George Keishingd8c8b312019-04-09 11:34:58 -05006Resource ../../lib/open_power_utils.robot
Sridevi Rameshd737eb92019-02-13 05:03:21 -06007
George Keishing36c39aa2019-03-01 04:33:58 -06008Test Setup Test Setup Execution
9Test Teardown Test Teardown Execution
Sridevi Rameshd737eb92019-02-13 05:03:21 -060010
11*** Test Cases ***
12
George Keishing4583a082019-02-25 10:28:42 -060013Verify Redfish Host GracefulShutdown
14 [Documentation] Verify Redfish host graceful shutdown operation.
15 [Tags] Verify_Redfish_Host_GracefulShutdown
Sridevi Rameshd737eb92019-02-13 05:03:21 -060016
17 Redfish Power Off
18
George Keishing9833f962019-10-07 12:37:57 -050019
Sridevi Rameshd737eb92019-02-13 05:03:21 -060020Verify Redfish BMC PowerOn
George Keishing4583a082019-02-25 10:28:42 -060021 [Documentation] Verify Redfish host power on operation.
22 [Tags] Verify_Redfish_Host_PowerOn
Sridevi Rameshd737eb92019-02-13 05:03:21 -060023
24 Redfish Power On
25
George Keishingd8c8b312019-04-09 11:34:58 -050026 # TODO: Replace OCC state check with redfish property when available.
27 Verify OCC State
28
George Keishing9833f962019-10-07 12:37:57 -050029 Redfish.Login
30 ${power_control}= Redfish.Get Attribute ${REDFISH_CHASSIS_POWER_URI} PowerControl
31 Rprint Vars power_control
32 Valid Dict power_control[${0}] ['PowerConsumedWatts']
33
34
Sridevi Rameshd737eb92019-02-13 05:03:21 -060035Verify Redfish BMC GracefulRestart
George Keishing4583a082019-02-25 10:28:42 -060036 [Documentation] Verify Redfish host graceful restart operation.
37 [Tags] Verify_Redfish_Host_GracefulRestart
Sridevi Rameshd737eb92019-02-13 05:03:21 -060038
39 Redfish Host Reboot
40
George Keishing9833f962019-10-07 12:37:57 -050041
Sridevi Rameshd737eb92019-02-13 05:03:21 -060042Verify Redfish BMC PowerOff
George Keishing4583a082019-02-25 10:28:42 -060043 [Documentation] Verify Redfish host power off operation.
44 [Tags] Verify_Redfish_Host_PowerOff
Sridevi Rameshd737eb92019-02-13 05:03:21 -060045
46 Redfish Hard Power Off
George Keishing36c39aa2019-03-01 04:33:58 -060047
48*** Keywords ***
49
50Test Setup Execution
51 [Documentation] Do test case setup tasks.
52
George Keishing9833f962019-10-07 12:37:57 -050053 Printn
George Keishing36c39aa2019-03-01 04:33:58 -060054 Start SOL Console Logging
55
56
57Test Teardown Execution
58 [Documentation] Collect FFDC and SOL log.
59
60 FFDC On Test Case Fail
61 ${sol_log}= Stop SOL Console Logging
62 Log ${sol_log}
63 Set Auto Reboot ${1}