blob: 94fa8a8cfc7e0c8fa92da848b88e65cd27f5d631 [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 Host PowerOn Via IPMI
[Documentation] Verify host power on status using external IPMI command.
[Tags] Verify_Host_PowerOn_Via_IPMI
Initiate Host Boot Via External IPMI
Verify Host PowerOff Via IPMI
[Documentation] Verify host power off status using external IPMI command.
[Tags] Verify_Host_PowerOff_Via_IPMI
Initiate Host PowerOff Via External IPMI
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