blob: 8ac328972799a2eaceabc8c2c1ebed5d035f0414 [file] [log] [blame]
Marissa Garza3047c622019-06-13 16:24:06 -05001*** Settings ***
2Documentation Getting the systems thermal records for temperature.
3
4Resource ../../lib/bmc_redfish_resource.robot
5Resource ../../lib/bmc_redfish_utils.robot
Marissa Garzacf6c38f2019-10-31 11:33:49 -05006Resource ../../lib/logging_utils.robot
7Resource ../../lib/boot_utils.robot
Marissa Garza3047c622019-06-13 16:24:06 -05008Resource ../../lib/openbmc_ffdc.robot
Marissa Garza3a7c0532019-06-27 17:24:31 -05009Library ../../lib/gen_robot_valid.py
Marissa Garzacf6c38f2019-10-31 11:33:49 -050010Library ../../lib/logging_utils.py
Marissa Garza3047c622019-06-13 16:24:06 -050011
12Suite Setup Suite Setup Execution
13Suite Teardown Suite Teardown Execution
George Keishing81b5dd32021-08-18 01:38:17 -050014Test Setup Redfish Purge Event Log
Marissa Garza3047c622019-06-13 16:24:06 -050015Test Teardown Test Teardown Execution
16
Igor Kanyukafeb79d62025-10-20 21:24:03 +010017Test Tags Thermal_Ambient_Temperatures
Marissa Garza3047c622019-06-13 16:24:06 -050018
19*** Test Cases ***
20
21Get 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 Garzacf6c38f2019-10-31 11:33:49 -050030Reboot 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 Lee6169b132022-04-18 17:03:37 +080035
36 # Clear errors if there are any.
Marissa Garzacf6c38f2019-10-31 11:33:49 -050037 Redfish.Login
Tim Lee6169b132022-04-18 17:03:37 +080038 Redfish Purge Event Log
Marissa Garzacf6c38f2019-10-31 11:33:49 -050039
40 Get Thermal Records and Verify Temperatures ReadingCelsius
41
42
Marissa Garza3047c622019-06-13 16:24:06 -050043*** Keywords ***
44
45Get 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 Lee2b975822021-04-01 11:15:00 +080053 ${records}= Verify Valid Records ${record_type}
54 ... ${REDFISH_CHASSIS_URI}/${CHASSIS_ID}/Thermal ${reading_type}
Marissa Garza3047c622019-06-13 16:24:06 -050055
56 ${num_records}= Get Length ${records}
Michael Walsh39c00512019-07-17 10:54:06 -050057 Rprint Vars num_records records
Marissa Garza3047c622019-06-13 16:24:06 -050058
Marissa Garza743d5972020-01-24 14:17:52 -060059 ${cmd} Catenate [x for x in ${records}
60 ... if not x['LowerThresholdNonCritical'] <= x['${reading_type}'] <= x['UpperThresholdNonCritical']]
61 ${invalid_records}= Evaluate ${cmd}
Marissa Garza3047c622019-06-13 16:24:06 -050062
Marissa Garza3a7c0532019-06-27 17:24:31 -050063 ${num_invalid_records}= Get Length ${invalid_records}
Sridevi Ramesh49c1b532025-05-09 04:32:43 -050064 IF ${num_invalid_records} > ${0}
65 Rprint Vars num_invalid_records invalid_records
66 END
67
Michael Walshe7edb222019-08-19 17:39:38 -050068 Valid Value num_invalid_records valid_values=[0]
Marissa Garza3047c622019-06-13 16:24:06 -050069
Tim Lee26393aa2022-04-15 11:00:37 +080070 Event Log Should Not Exist
Marissa Garzacf6c38f2019-10-31 11:33:49 -050071
72
Marissa Garza3047c622019-06-13 16:24:06 -050073Suite Teardown Execution
74 [Documentation] Do the post suite teardown.
75
76 Redfish.Logout
77
Marissa Garzacf6c38f2019-10-31 11:33:49 -050078
Marissa Garza3047c622019-06-13 16:24:06 -050079Suite Setup Execution
80 [Documentation] Do test case setup tasks.
81
Marissa Garza3a7c0532019-06-27 17:24:31 -050082 Printn
Marissa Garza3047c622019-06-13 16:24:06 -050083 Redfish.Login
Marissa Garzacf6c38f2019-10-31 11:33:49 -050084 Redfish Purge Event Log
85
Marissa Garza3047c622019-06-13 16:24:06 -050086
87Test Teardown Execution
88 [Documentation] Do the post test teardown.
89
90 FFDC On Test Case Fail