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 |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 8 | Resource ../../lib/resource.txt |
George Keishing | 0da47e9 | 2017-10-23 02:22:29 -0500 | [diff] [blame] | 9 | Resource ../../lib/state_manager.robot |
Sridevi Ramesh | 6da9c99 | 2016-11-23 04:26:25 -0600 | [diff] [blame] | 10 | |
| 11 | Suite Setup Open Connection And Log In |
| 12 | Suite Teardown Close All Connections |
Sweta Potthuri | 8b8f009 | 2017-12-20 09:38:55 -0600 | [diff] [blame] | 13 | Test Teardown Test Teardown Execution |
Sridevi Ramesh | 6da9c99 | 2016-11-23 04:26:25 -0600 | [diff] [blame] | 14 | |
| 15 | *** Test Cases *** |
| 16 | |
| 17 | IPMI Chassis Status On |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 18 | [Documentation] This test case verfies system power on status |
| 19 | ... using IPMI Get Chassis status command. |
Sridevi Ramesh | 6da9c99 | 2016-11-23 04:26:25 -0600 | [diff] [blame] | 20 | [Tags] IPMI_Chassis_Status_On |
| 21 | |
George Keishing | 0da47e9 | 2017-10-23 02:22:29 -0500 | [diff] [blame] | 22 | Initiate Host Boot |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 23 | ${resp}= Run IPMI Standard Command chassis status |
| 24 | ${power_status}= Get Lines Containing String ${resp} System Power |
| 25 | Should Contain ${power_status} on |
Sridevi Ramesh | 6da9c99 | 2016-11-23 04:26:25 -0600 | [diff] [blame] | 26 | |
| 27 | IPMI Chassis Status Off |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 28 | [Documentation] This test case verfies system power off status |
| 29 | ... using IPMI Get Chassis status command. |
Sridevi Ramesh | 6da9c99 | 2016-11-23 04:26:25 -0600 | [diff] [blame] | 30 | [Tags] IPMI_Chassis_Status_Off |
| 31 | |
George Keishing | 0da47e9 | 2017-10-23 02:22:29 -0500 | [diff] [blame] | 32 | Initiate Host PowerOff |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 33 | ${resp}= Run IPMI Standard Command chassis status |
| 34 | ${power_status}= Get Lines Containing String ${resp} System Power |
| 35 | Should Contain ${power_status} off |
Sridevi Ramesh | 6da9c99 | 2016-11-23 04:26:25 -0600 | [diff] [blame] | 36 | |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 37 | IPMI Chassis Restore Power Policy |
| 38 | [Documentation] Verfy IPMI chassis restore power policy. |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 39 | [Tags] IPMI_Chassis_Restore_Power_Policy |
| 40 | |
Sweta Potthuri | 8b8f009 | 2017-12-20 09:38:55 -0600 | [diff] [blame] | 41 | ${initial_power_policy}= Read Attribute |
| 42 | ... ${CONTROL_HOST_URI}/power_restore_policy PowerRestorePolicy |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 43 | |
George Keishing | 220b9a9 | 2017-08-21 23:37:36 -0500 | [diff] [blame] | 44 | Set BMC Power Policy ${ALWAYS_POWER_ON} |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 45 | ${resp}= Run IPMI Standard Command chassis status |
| 46 | ${power_status}= |
| 47 | ... Get Lines Containing String ${resp} Power Restore Policy |
| 48 | Should Contain ${power_status} always-on |
| 49 | |
George Keishing | 0da47e9 | 2017-10-23 02:22:29 -0500 | [diff] [blame] | 50 | Set BMC Power Policy ${RESTORE_LAST_STATE} |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 51 | ${resp}= Run IPMI Standard Command chassis status |
| 52 | ${power_status}= |
| 53 | ... Get Lines Containing String ${resp} Power Restore Policy |
| 54 | Should Contain ${power_status} previous |
| 55 | |
George Keishing | 220b9a9 | 2017-08-21 23:37:36 -0500 | [diff] [blame] | 56 | Set BMC Power Policy ${ALWAYS_POWER_OFF} |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 57 | ${resp}= Run IPMI Standard Command chassis status |
| 58 | ${power_status}= |
| 59 | ... Get Lines Containing String ${resp} Power Restore Policy |
| 60 | Should Contain ${power_status} always-off |
| 61 | |
| 62 | Set BMC Power Policy ${initial_power_policy} |
Sweta Potthuri | 8b8f009 | 2017-12-20 09:38:55 -0600 | [diff] [blame] | 63 | ${power_policy}= Read Attribute |
| 64 | ... ${CONTROL_HOST_URI}/power_restore_policy PowerRestorePolicy |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 65 | Should Be Equal ${power_policy} ${initial_power_policy} |
| 66 | |
Sridevi Ramesh | 7fe3dc0 | 2017-05-10 04:01:56 -0500 | [diff] [blame] | 67 | Verify Host PowerOn Via IPMI |
| 68 | [Documentation] Verify host power on status using external IPMI command. |
| 69 | [Tags] Verify_Host_PowerOn_Via_IPMI |
| 70 | |
| 71 | Initiate Host Boot Via External IPMI |
| 72 | |
| 73 | Verify Host PowerOff Via IPMI |
| 74 | [Documentation] Verify host power off status using external IPMI command. |
| 75 | [Tags] Verify_Host_PowerOff_Via_IPMI |
| 76 | |
| 77 | Initiate Host PowerOff Via External IPMI |
| 78 | |
| 79 | |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 80 | *** Keywords *** |
| 81 | |
Sweta Potthuri | 8b8f009 | 2017-12-20 09:38:55 -0600 | [diff] [blame] | 82 | Test Teardown Execution |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 83 | [Documentation] Log FFDC if test failed. |
| 84 | |
George Keishing | efc3ff2 | 2017-12-12 11:49:25 -0600 | [diff] [blame] | 85 | Set BMC Power Policy ${ALWAYS_POWER_OFF} |
Sridevi Ramesh | 1699d37 | 2016-12-06 00:20:22 -0600 | [diff] [blame] | 86 | |
| 87 | FFDC On Test Case Fail |