Joy Onyerikwu | 5b2d33c | 2021-01-22 00:48:49 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation BMC collect VPD and hardware status. |
| 3 | |
| 4 | # Test Parameters: |
| 5 | # OPENBMC_HOST The BMC host name or IP address. |
| 6 | |
Joy Onyerikwu | c3dcec3 | 2021-01-22 10:37:57 -0600 | [diff] [blame] | 7 | Resource ../lib/bmc_redfish_resource.robot |
| 8 | Resource ../lib/openbmc_ffdc.robot |
Joy Onyerikwu | 5b2d33c | 2021-01-22 00:48:49 -0600 | [diff] [blame] | 9 | |
| 10 | Suite Setup Suite Setup Execution |
| 11 | Test Setup Printn |
| 12 | |
| 13 | *** Variables *** |
| 14 | ${QUIET} ${1} |
| 15 | |
| 16 | *** Test Cases *** |
| 17 | |
| 18 | Collect VPD And Hardware Status |
| 19 | [Documentation] Collect VPD and hardware status using Redfish. |
George Keishing | 4203fad | 2022-01-31 12:22:33 -0600 | [diff] [blame] | 20 | [Tags] Collect_VPD_And_Hardware_Status |
Joy Onyerikwu | 5b2d33c | 2021-01-22 00:48:49 -0600 | [diff] [blame] | 21 | [Setup] Redfish.Login |
| 22 | [Teardown] Redfish Test Teardown Execution |
| 23 | |
| 24 | ${system_properties}= Redfish_Utils.Get Properties ${SYSTEM_BASE_URI} |
| 25 | ${system_memory_info}= Redfish_Utils.Enumerate Request ${SYSTEM_BASE_URI}/Memory |
| 26 | ${system_processors_info}= Redfish_Utils.Enumerate Request ${SYSTEM_BASE_URI}/Processors |
George Keishing | 7bb0991 | 2022-02-24 09:41:20 -0600 | [diff] [blame] | 27 | |
| 28 | # Python module: get_endpoint_path_list(resource_path, end_point_prefix) |
| 29 | ${thermal_uri}= redfish_utils.Get Endpoint Path List ${REDFISH_CHASSIS_URI} Thermal |
| 30 | ${system_fans_info}= Redfish_Utils.Get Attribute ${thermal_uri[0]} Fans |
| 31 | |
Joy Onyerikwu | 5b2d33c | 2021-01-22 00:48:49 -0600 | [diff] [blame] | 32 | ${collected_values}= gen_robot_print.Sprint Vars |
| 33 | ... system_properties system_memory_info system_processors_info system_fans_info |
| 34 | Log To Console ${\n}${collected_values}${\n} |
| 35 | |
| 36 | Run VPD Tool |
| 37 | [Documentation] Run vpd-tool -i. |
George Keishing | 4203fad | 2022-01-31 12:22:33 -0600 | [diff] [blame] | 38 | [Tags] Run_VPD_Tool |
Joy Onyerikwu | 5b2d33c | 2021-01-22 00:48:49 -0600 | [diff] [blame] | 39 | |
| 40 | BMC Execute Command vpd-tool -i print_out=${1} |
| 41 | |
| 42 | *** Keywords *** |
| 43 | |
| 44 | Suite Setup Execution |
| 45 | [Documentation] Do test case setup tasks. |
| 46 | |
| 47 | Set Log Level DEBUG |
| 48 | Log To Console ${OPENBMC_HOST} |
| 49 | |
| 50 | |
| 51 | Redfish Test Teardown Execution |
| 52 | [Documentation] Do the post test teardown for redfish. |
| 53 | |
| 54 | Redfish.Logout |
George Keishing | 7bb0991 | 2022-02-24 09:41:20 -0600 | [diff] [blame] | 55 | FFDC On Test Case Fail |