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