Joy Onyerikwu | d806cc0 | 2019-10-01 07:46:18 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation BMC server health, collect eSELs. |
| 3 | |
| 4 | # Test Parameters: |
| 5 | # OPENBMC_HOST The BMC host name or IP address. |
| 6 | |
| 7 | Resource ../../lib/bmc_redfish_resource.robot |
| 8 | Resource ../../lib/openbmc_ffdc.robot |
| 9 | |
| 10 | Suite Setup Suite Setup Execution |
| 11 | Suite Teardown Suite Teardown Execution |
| 12 | Test Setup Printn |
| 13 | |
| 14 | *** Variables *** |
| 15 | ${QUIET} ${1} |
| 16 | ${error_logs_flagged_rest} Rest error log collection excluded |
| 17 | ${event_logs_flagged_redfish} Redfish event log collection excluded |
| 18 | ${rest_error_logs} Rest error log collection excluded |
| 19 | ${redfish_event_logs} Redfish error log collection excluded |
| 20 | |
| 21 | *** Test Cases *** |
| 22 | |
| 23 | Rest Collect eSELs |
| 24 | [Documentation] Collect eSEL using the OpenBMC Rest API. |
| 25 | [Tags] Rest_Collect_eSELs rest |
George Keishing | 858d410 | 2023-07-12 22:33:51 +0530 | [diff] [blame] | 26 | [Teardown] FFDC On Test Case Fail |
Joy Onyerikwu | d806cc0 | 2019-10-01 07:46:18 -0500 | [diff] [blame] | 27 | |
| 28 | ${error_logs}= Get Error Logs ${QUIET} |
| 29 | ${rest_error_logs}= gen_robot_print.Sprint Vars error_logs |
| 30 | Set Suite Variable ${rest_error_logs} |
| 31 | Log To Console ${rest_error_logs} |
| 32 | |
| 33 | # Filter out informational error logs. |
| 34 | ${non_informational_error_logs}= Filter Struct ${error_logs} [('Severity', '\.Informational$')] |
| 35 | ... regex=1 invert=1 |
| 36 | ${error_logs_flagged_rest}= gen_robot_print.Sprint Vars non_informational_error_logs |
| 37 | Set Suite Variable ${error_logs_flagged_rest} |
| 38 | |
| 39 | |
| 40 | Redfish Collect eSELs |
| 41 | [Documentation] Collect eSEL with Redfish. |
| 42 | [Tags] Redfish_Collect_eSELs redfish |
| 43 | [Setup] Redfish.Login |
| 44 | [Teardown] Redfish Test Teardown Execution |
| 45 | |
| 46 | ${redfish_event_logs}= Get Event Logs |
| 47 | ${redfish_event_logs}= gen_robot_print.Sprint Vars redfish_event_logs |
| 48 | Set Suite Variable ${redfish_event_logs} |
| 49 | Log To Console ${redfish_event_logs} |
| 50 | ${event_logs_flagged_redfish}= Get Event Logs Not Ok |
| 51 | ${event_logs_flagged_redfish}= gen_robot_print.Sprint Vars event_logs_flagged_redfish |
| 52 | Set Suite Variable ${event_logs_flagged_redfish} |
| 53 | |
| 54 | |
| 55 | *** Keywords *** |
| 56 | |
| 57 | Suite Setup Execution |
| 58 | [Documentation] Do test suite setup tasks. |
| 59 | |
| 60 | Set Log Level DEBUG |
| 61 | REST Power On stack_mode=skip |
| 62 | |
| 63 | |
| 64 | Suite Teardown Execution |
| 65 | [Documentation] Do suite teardown tasks. Log error and event logs collected. |
| 66 | |
| 67 | Log Many ${rest_error_logs} ${redfish_event_logs} |
| 68 | Log Flagged error logs found via REST:${\n}${error_logs_flagged_rest} console=true |
| 69 | Log Flagged events logs found via Redfish:${\n}${event_logs_flagged_redfish} console=true |
| 70 | |
| 71 | |
| 72 | Redfish Test Teardown Execution |
| 73 | [Documentation] Do the post test teardown for redfish. |
| 74 | |
| 75 | Redfish.Logout |
George Keishing | 858d410 | 2023-07-12 22:33:51 +0530 | [diff] [blame] | 76 | FFDC On Test Case Fail |