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