| Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Getting the systems thermal records for temperature. |
| 3 | |
| 4 | Resource ../../lib/bmc_redfish_resource.robot |
| 5 | Resource ../../lib/bmc_redfish_utils.robot |
| Marissa Garza | cf6c38f | 2019-10-31 11:33:49 -0500 | [diff] [blame] | 6 | Resource ../../lib/logging_utils.robot |
| 7 | Resource ../../lib/boot_utils.robot |
| Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 8 | Resource ../../lib/openbmc_ffdc.robot |
| Marissa Garza | 3a7c053 | 2019-06-27 17:24:31 -0500 | [diff] [blame] | 9 | Library ../../lib/gen_robot_valid.py |
| Marissa Garza | cf6c38f | 2019-10-31 11:33:49 -0500 | [diff] [blame] | 10 | Library ../../lib/logging_utils.py |
| Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 11 | |
| 12 | Suite Setup Suite Setup Execution |
| 13 | Suite Teardown Suite Teardown Execution |
| George Keishing | 81b5dd3 | 2021-08-18 01:38:17 -0500 | [diff] [blame] | 14 | Test Setup Redfish Purge Event Log |
| Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 15 | Test Teardown Test Teardown Execution |
| 16 | |
| Igor Kanyuka | feb79d6 | 2025-10-20 21:24:03 +0100 | [diff] [blame] | 17 | Test Tags Thermal_Ambient_Temperatures |
| Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 18 | |
| 19 | *** Test Cases *** |
| 20 | |
| 21 | Get Ambient Temperature Records |
| 22 | [Documentation] Get the ambient temperature records. |
| 23 | [Tags] Get_Ambient_Temperature_Records |
| 24 | [Template] Get Thermal Records and Verify |
| 25 | |
| 26 | # record_type reading_type |
| 27 | Temperatures ReadingCelsius |
| 28 | |
| 29 | |
| Marissa Garza | cf6c38f | 2019-10-31 11:33:49 -0500 | [diff] [blame] | 30 | Reboot And Check Ambient Temperature Records Are Valid |
| 31 | [Documentation] Check the ambient temperature records are valid after a reboot. |
| 32 | [Tags] Reboot_And_Check_Ambient_Temperature_Records_Are_Valid |
| 33 | |
| 34 | Redfish OBMC Reboot (run) |
| Tim Lee | 6169b13 | 2022-04-18 17:03:37 +0800 | [diff] [blame] | 35 | |
| 36 | # Clear errors if there are any. |
| Marissa Garza | cf6c38f | 2019-10-31 11:33:49 -0500 | [diff] [blame] | 37 | Redfish.Login |
| Tim Lee | 6169b13 | 2022-04-18 17:03:37 +0800 | [diff] [blame] | 38 | Redfish Purge Event Log |
| Marissa Garza | cf6c38f | 2019-10-31 11:33:49 -0500 | [diff] [blame] | 39 | |
| 40 | Get Thermal Records and Verify Temperatures ReadingCelsius |
| 41 | |
| 42 | |
| Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 43 | *** Keywords *** |
| 44 | |
| 45 | Get Thermal Records and Verify |
| 46 | [Documentation] Get the thermal records for temperatures. |
| 47 | [Arguments] ${record_type} ${reading_type} |
| 48 | |
| 49 | # Description of Arguments(s): |
| 50 | # record_type The thermal record type (e.g. "Temperatures") |
| 51 | # reading_type The thermal temperature readings (e.g. "ReadingCelsius") |
| 52 | |
| Tony Lee | 2b97582 | 2021-04-01 11:15:00 +0800 | [diff] [blame] | 53 | ${records}= Verify Valid Records ${record_type} |
| 54 | ... ${REDFISH_CHASSIS_URI}/${CHASSIS_ID}/Thermal ${reading_type} |
| Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 55 | |
| 56 | ${num_records}= Get Length ${records} |
| Michael Walsh | 39c0051 | 2019-07-17 10:54:06 -0500 | [diff] [blame] | 57 | Rprint Vars num_records records |
| Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 58 | |
| Marissa Garza | 743d597 | 2020-01-24 14:17:52 -0600 | [diff] [blame] | 59 | ${cmd} Catenate [x for x in ${records} |
| 60 | ... if not x['LowerThresholdNonCritical'] <= x['${reading_type}'] <= x['UpperThresholdNonCritical']] |
| 61 | ${invalid_records}= Evaluate ${cmd} |
| Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 62 | |
| Marissa Garza | 3a7c053 | 2019-06-27 17:24:31 -0500 | [diff] [blame] | 63 | ${num_invalid_records}= Get Length ${invalid_records} |
| Sridevi Ramesh | 49c1b53 | 2025-05-09 04:32:43 -0500 | [diff] [blame] | 64 | IF ${num_invalid_records} > ${0} |
| 65 | Rprint Vars num_invalid_records invalid_records |
| 66 | END |
| 67 | |
| Michael Walsh | e7edb22 | 2019-08-19 17:39:38 -0500 | [diff] [blame] | 68 | Valid Value num_invalid_records valid_values=[0] |
| Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 69 | |
| Tim Lee | 26393aa | 2022-04-15 11:00:37 +0800 | [diff] [blame] | 70 | Event Log Should Not Exist |
| Marissa Garza | cf6c38f | 2019-10-31 11:33:49 -0500 | [diff] [blame] | 71 | |
| 72 | |
| Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 73 | Suite Teardown Execution |
| 74 | [Documentation] Do the post suite teardown. |
| 75 | |
| 76 | Redfish.Logout |
| 77 | |
| Marissa Garza | cf6c38f | 2019-10-31 11:33:49 -0500 | [diff] [blame] | 78 | |
| Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 79 | Suite Setup Execution |
| 80 | [Documentation] Do test case setup tasks. |
| 81 | |
| Marissa Garza | 3a7c053 | 2019-06-27 17:24:31 -0500 | [diff] [blame] | 82 | Printn |
| Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 83 | Redfish.Login |
| Marissa Garza | cf6c38f | 2019-10-31 11:33:49 -0500 | [diff] [blame] | 84 | Redfish Purge Event Log |
| 85 | |
| Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 86 | |
| 87 | Test Teardown Execution |
| 88 | [Documentation] Do the post test teardown. |
| 89 | |
| 90 | FFDC On Test Case Fail |