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