blob: 8a79051f584ad656533406a6d8ae5bc6b96b4658 [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
17
18*** Test Cases ***
19
20Get 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 Garzacf6c38f2019-10-31 11:33:49 -050029Reboot 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)
Tim Lee6169b132022-04-18 17:03:37 +080034
35 # Clear errors if there are any.
Marissa Garzacf6c38f2019-10-31 11:33:49 -050036 Redfish.Login
Tim Lee6169b132022-04-18 17:03:37 +080037 Redfish Purge Event Log
Marissa Garzacf6c38f2019-10-31 11:33:49 -050038
39 Get Thermal Records and Verify Temperatures ReadingCelsius
40
41
Marissa Garza3047c622019-06-13 16:24:06 -050042*** Keywords ***
43
44Get Thermal Records and Verify
45 [Documentation] Get the thermal records for temperatures.
46 [Arguments] ${record_type} ${reading_type}
47
48 # Description of Arguments(s):
49 # record_type The thermal record type (e.g. "Temperatures")
50 # reading_type The thermal temperature readings (e.g. "ReadingCelsius")
51
Tony Lee2b975822021-04-01 11:15:00 +080052 ${records}= Verify Valid Records ${record_type}
53 ... ${REDFISH_CHASSIS_URI}/${CHASSIS_ID}/Thermal ${reading_type}
Marissa Garza3047c622019-06-13 16:24:06 -050054
55 ${num_records}= Get Length ${records}
Michael Walsh39c00512019-07-17 10:54:06 -050056 Rprint Vars num_records records
Marissa Garza3047c622019-06-13 16:24:06 -050057
Marissa Garza743d5972020-01-24 14:17:52 -060058 ${cmd} Catenate [x for x in ${records}
59 ... if not x['LowerThresholdNonCritical'] <= x['${reading_type}'] <= x['UpperThresholdNonCritical']]
60 ${invalid_records}= Evaluate ${cmd}
Marissa Garza3047c622019-06-13 16:24:06 -050061
Marissa Garza3a7c0532019-06-27 17:24:31 -050062 ${num_invalid_records}= Get Length ${invalid_records}
63 Run Keyword If ${num_invalid_records} > ${0}
Michael Walsh39c00512019-07-17 10:54:06 -050064 ... Rprint Vars num_invalid_records invalid_records
Michael Walshe7edb222019-08-19 17:39:38 -050065 Valid Value num_invalid_records valid_values=[0]
Marissa Garza3047c622019-06-13 16:24:06 -050066
Tim Lee26393aa2022-04-15 11:00:37 +080067 Event Log Should Not Exist
Marissa Garzacf6c38f2019-10-31 11:33:49 -050068
69
Marissa Garza3047c622019-06-13 16:24:06 -050070Suite Teardown Execution
71 [Documentation] Do the post suite teardown.
72
73 Redfish.Logout
74
Marissa Garzacf6c38f2019-10-31 11:33:49 -050075
Marissa Garza3047c622019-06-13 16:24:06 -050076Suite Setup Execution
77 [Documentation] Do test case setup tasks.
78
Marissa Garza3a7c0532019-06-27 17:24:31 -050079 Printn
Marissa Garza3047c622019-06-13 16:24:06 -050080 Redfish.Login
Marissa Garzacf6c38f2019-10-31 11:33:49 -050081 Redfish Purge Event Log
82
Marissa Garza3047c622019-06-13 16:24:06 -050083
84Test Teardown Execution
85 [Documentation] Do the post test teardown.
86
87 FFDC On Test Case Fail