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 |
Marissa Garza | 3a7c053 | 2019-06-27 17:24:31 -0500 | [diff] [blame] | 14 | Test Setup Printn |
Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 15 | Test Teardown Test Teardown Execution |
| 16 | |
| 17 | |
| 18 | *** Test Cases *** |
| 19 | |
| 20 | Get Ambient Temperature Records |
| 21 | [Documentation] Get the ambient temperature records. |
| 22 | [Tags] Get_Ambient_Temperature_Records |
| 23 | [Template] Get Thermal Records and Verify |
| 24 | |
| 25 | # record_type reading_type |
| 26 | Temperatures ReadingCelsius |
| 27 | |
| 28 | |
Marissa Garza | cf6c38f | 2019-10-31 11:33:49 -0500 | [diff] [blame] | 29 | Reboot And Check Ambient Temperature Records Are Valid |
| 30 | [Documentation] Check the ambient temperature records are valid after a reboot. |
| 31 | [Tags] Reboot_And_Check_Ambient_Temperature_Records_Are_Valid |
| 32 | |
| 33 | Redfish OBMC Reboot (run) |
| 34 | Redfish.Login |
| 35 | |
| 36 | Get Thermal Records and Verify Temperatures ReadingCelsius |
| 37 | |
| 38 | |
Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 39 | *** Keywords *** |
| 40 | |
| 41 | Get Thermal Records and Verify |
| 42 | [Documentation] Get the thermal records for temperatures. |
| 43 | [Arguments] ${record_type} ${reading_type} |
| 44 | |
| 45 | # Description of Arguments(s): |
| 46 | # record_type The thermal record type (e.g. "Temperatures") |
| 47 | # reading_type The thermal temperature readings (e.g. "ReadingCelsius") |
| 48 | |
Marissa Garza | cf6c38f | 2019-10-31 11:33:49 -0500 | [diff] [blame] | 49 | ${records}= Verify Valid Records ${record_type} ${REDFISH_CHASSIS_THERMAL_URI} ${reading_type} |
Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 50 | |
| 51 | ${num_records}= Get Length ${records} |
Michael Walsh | 39c0051 | 2019-07-17 10:54:06 -0500 | [diff] [blame] | 52 | Rprint Vars num_records records |
Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 53 | |
Marissa Garza | 3a7c053 | 2019-06-27 17:24:31 -0500 | [diff] [blame] | 54 | ${invalid_records}= Evaluate |
Marissa Garza | cf6c38f | 2019-10-31 11:33:49 -0500 | [diff] [blame] | 55 | ... [x for x in ${records} if not x['LowerThresholdNonCritical'] <= x['${reading_type}'] <= x['UpperThresholdNonCritical']] |
Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 56 | |
Marissa Garza | 3a7c053 | 2019-06-27 17:24:31 -0500 | [diff] [blame] | 57 | ${num_invalid_records}= Get Length ${invalid_records} |
| 58 | Run Keyword If ${num_invalid_records} > ${0} |
Michael Walsh | 39c0051 | 2019-07-17 10:54:06 -0500 | [diff] [blame] | 59 | ... Rprint Vars num_invalid_records invalid_records |
Michael Walsh | e7edb22 | 2019-08-19 17:39:38 -0500 | [diff] [blame] | 60 | Valid Value num_invalid_records valid_values=[0] |
Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 61 | |
Marissa Garza | cf6c38f | 2019-10-31 11:33:49 -0500 | [diff] [blame] | 62 | Error Logs Should Not Exist |
| 63 | |
| 64 | |
Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 65 | Suite Teardown Execution |
| 66 | [Documentation] Do the post suite teardown. |
| 67 | |
| 68 | Redfish.Logout |
| 69 | |
Marissa Garza | cf6c38f | 2019-10-31 11:33:49 -0500 | [diff] [blame] | 70 | |
Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 71 | Suite Setup Execution |
| 72 | [Documentation] Do test case setup tasks. |
| 73 | |
Marissa Garza | 3a7c053 | 2019-06-27 17:24:31 -0500 | [diff] [blame] | 74 | Printn |
Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 75 | Redfish.Login |
Marissa Garza | cf6c38f | 2019-10-31 11:33:49 -0500 | [diff] [blame] | 76 | Redfish Purge Event Log |
| 77 | |
Marissa Garza | 3047c62 | 2019-06-13 16:24:06 -0500 | [diff] [blame] | 78 | |
| 79 | Test Teardown Execution |
| 80 | [Documentation] Do the post test teardown. |
| 81 | |
| 82 | FFDC On Test Case Fail |