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