1*** Settings *** 2Documentation Getting the systems thermal records for temperature. 3 4Resource ../../lib/bmc_redfish_resource.robot 5Resource ../../lib/bmc_redfish_utils.robot 6Resource ../../lib/openbmc_ffdc.robot 7 8Suite Setup Suite Setup Execution 9Suite Teardown Suite Teardown Execution 10Test Teardown Test Teardown Execution 11 12 13*** Test Cases *** 14 15Get Ambient Temperature Records 16 [Documentation] Get the ambient temperature records. 17 [Tags] Get_Ambient_Temperature_Records 18 [Template] Get Thermal Records and Verify 19 20 # record_type reading_type 21 Temperatures ReadingCelsius 22 23 24*** Keywords *** 25 26Get Thermal Records and Verify 27 [Documentation] Get the thermal records for temperatures. 28 [Arguments] ${record_type} ${reading_type} 29 30 # Description of Arguments(s): 31 # record_type The thermal record type (e.g. "Temperatures") 32 # reading_type The thermal temperature readings (e.g. "ReadingCelsius") 33 34 # A valid record will have "State" key "Enabled" and "Health" key "OK" 35 36 ${records}= Redfish.Get Attribute 37 ... ${REDFISH_CHASSIS_THERMAL_URI} ${record_type} 38 39 ${num_records}= Get Length ${records} 40 41 ${valid_records}= Filter Struct ${records} 42 ... [('Health', '^OK$'), ('State', '^Enabled$'), ('${reading_type}', '')] regex=1 43 44 ${num_valid_records}= Get Length ${valid_records} 45 46 Rprint Vars num_records records valid_records 47 ... num_valid_records fmt=terse 48 49 Should Be Equal As Integers ${num_records} ${num_valid_records} 50 51Suite Teardown Execution 52 [Documentation] Do the post suite teardown. 53 54 Redfish.Logout 55 56Suite Setup Execution 57 [Documentation] Do test case setup tasks. 58 59 Redfish.Login 60 61Test Teardown Execution 62 [Documentation] Do the post test teardown. 63 64 FFDC On Test Case Fail 65