blob: a02b8014f5296ee9e4a9185b0d3c142055d8b3cf [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}
*** Keywords ***
Test Teardown Execution
[Documentation] Log FFDC if test failed.
Set BMC Power Policy ${ALWAYS_POWER_OFF}
FFDC On Test Case Fail