blob: cef699e3eb21541c63048dee0558b65f81c32a61 [file] [log] [blame]
*** Settings ***
Documentation This suite tests IPMI chassis status in Open BMC.
Resource ../../lib/rest_client.robot
Resource ../../lib/ipmi_client.robot
Resource ../../lib/openbmc_ffdc.robot
Resource ../../lib/utils.robot
Resource ../../lib/boot_utils.robot
Resource ../../lib/resource.robot
Resource ../../lib/state_manager.robot
Test Teardown Test Teardown Execution
*** Test Cases ***
IPMI Chassis Restore Power Policy
[Documentation] Verify IPMI chassis restore power policy.
[Tags] IPMI_Chassis_Restore_Power_Policy
${initial_power_policy}= Read Attribute
... ${CONTROL_HOST_URI}/power_restore_policy PowerRestorePolicy
Set BMC Power Policy ${ALWAYS_POWER_ON}
${resp}= Run IPMI Standard Command chassis status
${power_status}=
... Get Lines Containing String ${resp} Power Restore Policy
Should Contain ${power_status} always-on
Set BMC Power Policy ${RESTORE_LAST_STATE}
${resp}= Run IPMI Standard Command chassis status
${power_status}=
... Get Lines Containing String ${resp} Power Restore Policy
Should Contain ${power_status} previous
Set BMC Power Policy ${ALWAYS_POWER_OFF}
${resp}= Run IPMI Standard Command chassis status
${power_status}=
... Get Lines Containing String ${resp} Power Restore Policy
Should Contain ${power_status} always-off
Set BMC Power Policy ${initial_power_policy}
${power_policy}= Read Attribute
... ${CONTROL_HOST_URI}/power_restore_policy PowerRestorePolicy
Should Be Equal ${power_policy} ${initial_power_policy}
Verify Soft Shutdown via IPMI
[Documentation] Verify Host OS shutdown softly using IPMI command.
[Tags] Verify_Soft_Shutdown_via_IPMI
REST Power On stack_mode=skip
Run IPMI Standard Command chassis power soft
Wait Until Keyword Succeeds 3 min 10 sec Is Host Off
*** Keywords ***
Test Teardown Execution
[Documentation] Log FFDC if test failed.
Set BMC Power Policy ${ALWAYS_POWER_OFF}
FFDC On Test Case Fail