George Keishing | 50cd001 | 2017-09-14 12:23:41 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Suite to test OCC power module. |
| 3 | |
George Keishing | 05d42fe | 2022-03-29 10:53:51 -0500 | [diff] [blame] | 4 | Resource ../lib/bmc_redfish_resource.robot |
| 5 | Resource ../lib/open_power_utils.robot |
| 6 | Resource ../lib/boot_utils.robot |
| 7 | Resource ../lib/state_manager.robot |
| 8 | Resource ../lib/openbmc_ffdc.robot |
| 9 | Resource ../lib/utils.robot |
George Keishing | 50cd001 | 2017-09-14 12:23:41 -0500 | [diff] [blame] | 10 | |
| 11 | Suite Setup Suite Setup Execution |
| 12 | Test Teardown Test Teardown Execution |
| 13 | |
Sridevi Ramesh | 8966617 | 2025-09-28 04:15:29 -0500 | [diff] [blame] | 14 | Test Tags Test_OCC_Power |
| 15 | |
George Keishing | 50cd001 | 2017-09-14 12:23:41 -0500 | [diff] [blame] | 16 | *** Test Cases *** |
| 17 | |
| 18 | Verify OCC Object Count |
| 19 | [Documentation] Verify that OCC and inventory entries match. |
| 20 | [Tags] Verify_OCC_Object_Count |
| 21 | |
| 22 | # Example: |
| 23 | # /org/open_power/control/enumerate |
| 24 | # { |
| 25 | # "/org/open_power/control/host0": {}, |
| 26 | # "/org/open_power/control/occ0": { |
| 27 | # "OccActive": 0 |
| 28 | # }, |
| 29 | # "/org/open_power/control/occ1": { |
| 30 | # "OccActive": 0 |
| 31 | # } |
| 32 | # } |
| 33 | |
| 34 | # Inventory counterpart cpu's: |
| 35 | # "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu0", |
| 36 | # "/xyz/openbmc_project/inventory/system/chassis/motherboard/cpu1", |
| 37 | |
| 38 | ${inventory_count}= Count Object Entries |
| 39 | ... ${HOST_INVENTORY_URI}system/chassis/motherboard/ cpu* |
| 40 | |
| 41 | Should Be Equal ${occ_count} ${inventory_count} |
| 42 | ... msg=OCC and inventory entry counts are mismatched. |
| 43 | |
George Keishing | 02a686b | 2019-06-12 13:00:43 -0500 | [diff] [blame] | 44 | |
George Keishing | 5d8dc12 | 2017-12-20 08:00:34 -0600 | [diff] [blame] | 45 | Verify OCC State When Host Is Booted |
Sweta Potthuri | 9d62b50 | 2017-10-10 03:57:42 -0500 | [diff] [blame] | 46 | [Documentation] Verify OCC state when host is booted. |
George Keishing | 5d8dc12 | 2017-12-20 08:00:34 -0600 | [diff] [blame] | 47 | [Tags] Verify_OCC_State_When_Host_Is_Booted |
George Keishing | 50cd001 | 2017-09-14 12:23:41 -0500 | [diff] [blame] | 48 | |
Sweta Potthuri | 9d62b50 | 2017-10-10 03:57:42 -0500 | [diff] [blame] | 49 | Verify OCC State ${1} |
George Keishing | 50cd001 | 2017-09-14 12:23:41 -0500 | [diff] [blame] | 50 | |
George Keishing | 02a686b | 2019-06-12 13:00:43 -0500 | [diff] [blame] | 51 | |
Sweta Potthuri | 9d62b50 | 2017-10-10 03:57:42 -0500 | [diff] [blame] | 52 | Verify OCC State After Host Reboot |
| 53 | [Documentation] Verify OCC state and count after host reboot. |
| 54 | [Tags] Verify_OCC_State_After_Host_Reboot |
George Keishing | 50cd001 | 2017-09-14 12:23:41 -0500 | [diff] [blame] | 55 | |
George Keishing | fb218a1 | 2018-11-28 11:20:42 -0600 | [diff] [blame] | 56 | ${occ_count_before}= Count OCC Object Entry |
Sweta Potthuri | 9d62b50 | 2017-10-10 03:57:42 -0500 | [diff] [blame] | 57 | Verify OCC State ${1} |
George Keishing | e523fc0 | 2020-03-23 12:28:01 -0500 | [diff] [blame] | 58 | RF SYS GracefulRestart |
Sweta Potthuri | 9d62b50 | 2017-10-10 03:57:42 -0500 | [diff] [blame] | 59 | Verify OCC State ${1} |
George Keishing | fb218a1 | 2018-11-28 11:20:42 -0600 | [diff] [blame] | 60 | ${occ_count_after}= Count OCC Object Entry |
Sweta Potthuri | 9d62b50 | 2017-10-10 03:57:42 -0500 | [diff] [blame] | 61 | Should be Equal ${occ_count_before} ${occ_count_after} |
George Keishing | 50cd001 | 2017-09-14 12:23:41 -0500 | [diff] [blame] | 62 | |
George Keishing | 02a686b | 2019-06-12 13:00:43 -0500 | [diff] [blame] | 63 | |
Sweta Potthuri | 9d62b50 | 2017-10-10 03:57:42 -0500 | [diff] [blame] | 64 | Verify OCC State After BMC Reset |
| 65 | [Documentation] Verify OCC state and count after BMC reset. |
| 66 | [Tags] Verify_OCC_State_After_BMC_Reset |
| 67 | |
George Keishing | fb218a1 | 2018-11-28 11:20:42 -0600 | [diff] [blame] | 68 | ${occ_count_before}= Count OCC Object Entry |
George Keishing | 02a686b | 2019-06-12 13:00:43 -0500 | [diff] [blame] | 69 | Redfish OBMC Reboot (run) |
Sweta Potthuri | 9d62b50 | 2017-10-10 03:57:42 -0500 | [diff] [blame] | 70 | Verify OCC State ${1} |
George Keishing | fb218a1 | 2018-11-28 11:20:42 -0600 | [diff] [blame] | 71 | ${occ_count_after}= Count OCC Object Entry |
Sweta Potthuri | 9d62b50 | 2017-10-10 03:57:42 -0500 | [diff] [blame] | 72 | Should be Equal ${occ_count_before} ${occ_count_after} |
| 73 | |
George Keishing | 02a686b | 2019-06-12 13:00:43 -0500 | [diff] [blame] | 74 | |
Sweta Potthuri | 9d62b50 | 2017-10-10 03:57:42 -0500 | [diff] [blame] | 75 | Verify OCC State At Standby |
| 76 | [Documentation] Verify OCC state at standby. |
| 77 | [Tags] Verify_OCC_State_At_Standby |
| 78 | |
George Keishing | 02a686b | 2019-06-12 13:00:43 -0500 | [diff] [blame] | 79 | Redfish Power Off stack_mode=normal |
Sweta Potthuri | 9d62b50 | 2017-10-10 03:57:42 -0500 | [diff] [blame] | 80 | Verify OCC State ${0} |
George Keishing | 50cd001 | 2017-09-14 12:23:41 -0500 | [diff] [blame] | 81 | |
| 82 | *** Keywords *** |
| 83 | |
| 84 | Suite Setup Execution |
| 85 | [Documentation] Do the initial test suite setup. |
George Keishing | 50cd001 | 2017-09-14 12:23:41 -0500 | [diff] [blame] | 86 | |
George Keishing | 02a686b | 2019-06-12 13:00:43 -0500 | [diff] [blame] | 87 | Redfish Power On |
George Keishing | 50cd001 | 2017-09-14 12:23:41 -0500 | [diff] [blame] | 88 | Count OCC Object Entry |
| 89 | |
George Keishing | 50cd001 | 2017-09-14 12:23:41 -0500 | [diff] [blame] | 90 | Count OCC Object Entry |
| 91 | [Documentation] Count OCC object entry and set count. |
| 92 | |
| 93 | ${object_count}= Count Object Entries ${OPENPOWER_CONTROL} occ* |
| 94 | Set Suite Variable ${occ_count] ${object_count} |
| 95 | |
| 96 | |
| 97 | Test Teardown Execution |
| 98 | [Documentation] Do the post test teardown. |
| 99 | # - Capture FFDC on test failure. |
| 100 | # - Delete error logs. |
| 101 | # - Close all open SSH connections. |
| 102 | |
| 103 | FFDC On Test Case Fail |
George Keishing | 02a686b | 2019-06-12 13:00:43 -0500 | [diff] [blame] | 104 | Redfish.Login |
| 105 | Redfish Purge Event Log |
George Keishing | 50cd001 | 2017-09-14 12:23:41 -0500 | [diff] [blame] | 106 | Close All Connections |