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