blob: a6431a562bff465d8e45886ff265f4a6a309056f [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
Lei YU46b1a8e2020-01-16 14:21:53 +080020Verify Redfish BMC PowerOn With OCC State
21 [Documentation] Verify Redfish host power on operation.
22 [Tags] Verify_Redfish_BMC_PowerOn_With_OCC_State
23
24 Redfish Power On
25
26 # TODO: Replace OCC state check with redfish property when available.
27 Verify OCC State
28
29
Sridevi Rameshd737eb92019-02-13 05:03:21 -060030Verify Redfish BMC PowerOn
George Keishing4583a082019-02-25 10:28:42 -060031 [Documentation] Verify Redfish host power on operation.
32 [Tags] Verify_Redfish_Host_PowerOn
Sridevi Rameshd737eb92019-02-13 05:03:21 -060033
34 Redfish Power On
35
George Keishingd8c8b312019-04-09 11:34:58 -050036 # TODO: Replace OCC state check with redfish property when available.
37 Verify OCC State
38
George Keishing9833f962019-10-07 12:37:57 -050039 ${power_control}= Redfish.Get Attribute ${REDFISH_CHASSIS_POWER_URI} PowerControl
40 Rprint Vars power_control
41 Valid Dict power_control[${0}] ['PowerConsumedWatts']
42
43
Sridevi Rameshd737eb92019-02-13 05:03:21 -060044Verify Redfish BMC GracefulRestart
George Keishing4583a082019-02-25 10:28:42 -060045 [Documentation] Verify Redfish host graceful restart operation.
46 [Tags] Verify_Redfish_Host_GracefulRestart
Sridevi Rameshd737eb92019-02-13 05:03:21 -060047
George Keishinge523fc02020-03-23 12:28:01 -050048 RF SYS GracefulRestart
Sridevi Rameshd737eb92019-02-13 05:03:21 -060049
George Keishing9833f962019-10-07 12:37:57 -050050
Sridevi Rameshd737eb92019-02-13 05:03:21 -060051Verify Redfish BMC PowerOff
George Keishing4583a082019-02-25 10:28:42 -060052 [Documentation] Verify Redfish host power off operation.
53 [Tags] Verify_Redfish_Host_PowerOff
Sridevi Rameshd737eb92019-02-13 05:03:21 -060054
55 Redfish Hard Power Off
George Keishing36c39aa2019-03-01 04:33:58 -060056
57*** Keywords ***
58
59Test Setup Execution
60 [Documentation] Do test case setup tasks.
61
George Keishing9833f962019-10-07 12:37:57 -050062 Printn
George Keishing36c39aa2019-03-01 04:33:58 -060063 Start SOL Console Logging
George Keishing2997a282020-06-16 00:42:08 -050064 Redfish.Login
George Keishing36c39aa2019-03-01 04:33:58 -060065
66
67Test Teardown Execution
68 [Documentation] Collect FFDC and SOL log.
69
70 FFDC On Test Case Fail
71 ${sol_log}= Stop SOL Console Logging
72 Log ${sol_log}
George Keishing99a62052020-06-12 13:32:13 -050073
74 Run Keyword If ${REDFISH_SUPPORTED}
75 ... Redfish Set Auto Reboot RetryAttempts
76 ... ELSE
77 ... Set Auto Reboot ${1}
George Keishing2997a282020-06-16 00:42:08 -050078 Redfish.Logout