Sridevi Ramesh | 6da9c99 | 2016-11-23 04:26:25 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This suite tests IPMI chassis status in Open BMC. |
| 3 | |
| 4 | Resource ../../lib/rest_client.robot |
| 5 | Resource ../../lib/ipmi_client.robot |
| 6 | Resource ../../lib/openbmc_ffdc.robot |
| 7 | Resource ../../lib/utils.robot |
Manash Sarma | f8c4075 | 2018-03-13 16:38:16 +0530 | [diff] [blame] | 8 | Resource ../../lib/boot_utils.robot |
Sandhya Somashekar | 839a0c2 | 2019-01-31 05:05:43 -0600 | [diff] [blame] | 9 | Resource ../../lib/resource.robot |
George Keishing | 0da47e9 | 2017-10-23 02:22:29 -0500 | [diff] [blame] | 10 | Resource ../../lib/state_manager.robot |
Sridevi Ramesh | 6da9c99 | 2016-11-23 04:26:25 -0600 | [diff] [blame] | 11 | |
Sweta Potthuri | 8b8f009 | 2017-12-20 09:38:55 -0600 | [diff] [blame] | 12 | Test Teardown Test Teardown Execution |
Sridevi Ramesh | 6da9c99 | 2016-11-23 04:26:25 -0600 | [diff] [blame] | 13 | |
| 14 | *** Test Cases *** |
| 15 | |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 16 | IPMI Chassis Restore Power Policy |
George Keishing | cb3b9b6 | 2018-09-14 12:11:19 -0500 | [diff] [blame] | 17 | [Documentation] Verify IPMI chassis restore power policy. |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 18 | [Tags] IPMI_Chassis_Restore_Power_Policy |
| 19 | |
Sweta Potthuri | 8b8f009 | 2017-12-20 09:38:55 -0600 | [diff] [blame] | 20 | ${initial_power_policy}= Read Attribute |
| 21 | ... ${CONTROL_HOST_URI}/power_restore_policy PowerRestorePolicy |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 22 | |
George Keishing | 220b9a9 | 2017-08-21 23:37:36 -0500 | [diff] [blame] | 23 | Set BMC Power Policy ${ALWAYS_POWER_ON} |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 24 | ${resp}= Run IPMI Standard Command chassis status |
| 25 | ${power_status}= |
| 26 | ... Get Lines Containing String ${resp} Power Restore Policy |
| 27 | Should Contain ${power_status} always-on |
| 28 | |
George Keishing | 0da47e9 | 2017-10-23 02:22:29 -0500 | [diff] [blame] | 29 | Set BMC Power Policy ${RESTORE_LAST_STATE} |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 30 | ${resp}= Run IPMI Standard Command chassis status |
| 31 | ${power_status}= |
| 32 | ... Get Lines Containing String ${resp} Power Restore Policy |
| 33 | Should Contain ${power_status} previous |
| 34 | |
George Keishing | 220b9a9 | 2017-08-21 23:37:36 -0500 | [diff] [blame] | 35 | Set BMC Power Policy ${ALWAYS_POWER_OFF} |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 36 | ${resp}= Run IPMI Standard Command chassis status |
| 37 | ${power_status}= |
| 38 | ... Get Lines Containing String ${resp} Power Restore Policy |
| 39 | Should Contain ${power_status} always-off |
| 40 | |
| 41 | Set BMC Power Policy ${initial_power_policy} |
Sweta Potthuri | 8b8f009 | 2017-12-20 09:38:55 -0600 | [diff] [blame] | 42 | ${power_policy}= Read Attribute |
| 43 | ... ${CONTROL_HOST_URI}/power_restore_policy PowerRestorePolicy |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 44 | Should Be Equal ${power_policy} ${initial_power_policy} |
| 45 | |
Sridevi Ramesh | 7fe3dc0 | 2017-05-10 04:01:56 -0500 | [diff] [blame] | 46 | Verify Host PowerOn Via IPMI |
| 47 | [Documentation] Verify host power on status using external IPMI command. |
| 48 | [Tags] Verify_Host_PowerOn_Via_IPMI |
| 49 | |
| 50 | Initiate Host Boot Via External IPMI |
| 51 | |
| 52 | Verify Host PowerOff Via IPMI |
| 53 | [Documentation] Verify host power off status using external IPMI command. |
| 54 | [Tags] Verify_Host_PowerOff_Via_IPMI |
| 55 | |
| 56 | Initiate Host PowerOff Via External IPMI |
| 57 | |
Manash Sarma | f8c4075 | 2018-03-13 16:38:16 +0530 | [diff] [blame] | 58 | Verify Soft Shutdown via IPMI |
| 59 | [Documentation] Verify Host OS shutdown softly using IPMI command. |
| 60 | [Tags] Verify_Soft_Shutdown_via_IPMI |
| 61 | |
| 62 | REST Power On stack_mode=skip |
Rahul Maheshwari | d8037d3 | 2018-12-17 00:59:57 -0600 | [diff] [blame] | 63 | Run IPMI Standard Command chassis power soft |
Manash Sarma | f8c4075 | 2018-03-13 16:38:16 +0530 | [diff] [blame] | 64 | Wait Until Keyword Succeeds 3 min 10 sec Is Host Off |
| 65 | |
Sridevi Ramesh | 7fe3dc0 | 2017-05-10 04:01:56 -0500 | [diff] [blame] | 66 | |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 67 | *** Keywords *** |
| 68 | |
Sweta Potthuri | 8b8f009 | 2017-12-20 09:38:55 -0600 | [diff] [blame] | 69 | Test Teardown Execution |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 70 | [Documentation] Log FFDC if test failed. |
| 71 | |
George Keishing | efc3ff2 | 2017-12-12 11:49:25 -0600 | [diff] [blame] | 72 | Set BMC Power Policy ${ALWAYS_POWER_OFF} |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 73 | |
| 74 | FFDC On Test Case Fail |