Rahul Maheshwari | 07d91d2 | 2019-07-31 01:12:05 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | |
| 3 | Documentation Module to test IPMI chassis functionality. |
| 4 | Resource ../lib/ipmi_client.robot |
| 5 | Resource ../lib/openbmc_ffdc.robot |
Rahul Maheshwari | f724a00 | 2020-02-21 05:17:02 -0600 | [diff] [blame] | 6 | Library ../lib/ipmi_utils.py |
Rahul Maheshwari | 07d91d2 | 2019-07-31 01:12:05 -0500 | [diff] [blame] | 7 | |
| 8 | Test Teardown FFDC On Test Case Fail |
| 9 | |
| 10 | *** Test Cases *** |
| 11 | |
| 12 | IPMI Chassis Status On |
| 13 | [Documentation] This test case verfies system power on status |
| 14 | ... using IPMI Get Chassis status command. |
| 15 | [Tags] IPMI_Chassis_Status_On |
| 16 | |
| 17 | Redfish Power On stack_mode=skip quiet=1 |
| 18 | ${resp}= Run IPMI Standard Command chassis status |
| 19 | ${power_status}= Get Lines Containing String ${resp} System Power |
| 20 | Should Contain ${power_status} on |
| 21 | |
| 22 | IPMI Chassis Status Off |
| 23 | [Documentation] This test case verfies system power off status |
| 24 | ... using IPMI Get Chassis status command. |
| 25 | [Tags] IPMI_Chassis_Status_Off |
| 26 | |
| 27 | Redfish Power Off stack_mode=skip quiet=1 |
| 28 | ${resp}= Run IPMI Standard Command chassis status |
| 29 | ${power_status}= Get Lines Containing String ${resp} System Power |
| 30 | Should Contain ${power_status} off |
Sushma M M | 1cc2127 | 2020-01-05 23:47:46 -0600 | [diff] [blame] | 31 | |
| 32 | Verify Host PowerOff Via IPMI |
| 33 | [Documentation] Verify host power off operation using external IPMI command. |
| 34 | [Tags] Verify_Host_PowerOff_Via_IPMI |
| 35 | |
| 36 | IPMI Power Off |
| 37 | ${ipmi_state}= Get Host State Via External IPMI |
| 38 | Valid Value ipmi_state ['off'] |
| 39 | |
| 40 | Verify Host PowerOn Via IPMI |
| 41 | [Documentation] Verify host power on operation using external IPMI command. |
| 42 | [Tags] Verify_Host_PowerOn_Via_IPMI |
| 43 | |
| 44 | IPMI Power On |
| 45 | ${ipmi_state}= Get Host State Via External IPMI |
Rahul Maheshwari | 460778d | 2020-02-23 22:37:22 -0600 | [diff] [blame] | 46 | Valid Value ipmi_state ['on'] |
| 47 | |
| 48 | |
| 49 | Verify Soft Shutdown |
| 50 | [Documentation] Verify host OS shutdown softly via IPMI command. |
| 51 | [Tags] Verify_Soft_Stutdown |
| 52 | |
| 53 | Redfish Power On stack_mode=skip |
| 54 | Run IPMI Standard Command chassis power soft |
| 55 | Wait Until Keyword Succeeds 3 min 10 sec Is Host Off Via IPMI |
| 56 | |
Rahul Maheshwari | f724a00 | 2020-02-21 05:17:02 -0600 | [diff] [blame] | 57 | |
| 58 | Verify Chassis Power Policy |
| 59 | [Documentation] Verify setting chassis power policy via IPMI command. |
| 60 | [Tags] Verify_Chassis_Power_Policy |
| 61 | [Setup] Test Setup Execution |
| 62 | [Teardown] Run Keywords FFDC On Test Case Fail AND |
| 63 | ... Run IPMI Standard Command chassis policy ${initial_power_policy} |
| 64 | [Template] Set Chassis Power Policy Via IPMI And Verify |
| 65 | |
| 66 | # power_policy |
| 67 | always-off |
| 68 | always-on |
| 69 | previous |
| 70 | |
| 71 | |
| 72 | *** Keywords *** |
| 73 | |
| 74 | Set Chassis Power Policy Via IPMI And Verify |
| 75 | [Documentation] Set chasiss power policy via IPMI and verify. |
| 76 | [Arguments] ${power_policy} |
| 77 | |
| 78 | # Description of argument(s): |
| 79 | # power_policy Chassis power policy to be set(e.g. "always-off", "always-on"). |
| 80 | |
| 81 | Run IPMI Standard Command chassis policy ${power_policy} |
| 82 | ${resp}= Get Chassis Status |
| 83 | Valid Value resp['power_restore_policy'] ['${power_policy}'] |
| 84 | |
| 85 | |
| 86 | Test Setup Execution |
| 87 | [Documentation] Do test setup tasks. |
| 88 | |
| 89 | ${chassis_status}= Get Chassis Status |
| 90 | Set Test Variable ${initial_power_policy} ${chassis_status['power_restore_policy']} |
| 91 | |