blob: 21910dafbc2ef0d75761c6b8009f783c5c610e16 [file] [log] [blame]
Marissa Garza6e3f9ec2019-07-24 15:31:26 -05001*** Settings ***
Marissa Garzad76b1422019-09-13 16:31:54 -05002Documentation Get the system power supply voltage readings.
Marissa Garza6e3f9ec2019-07-24 15:31:26 -05003
4Resource ../../lib/bmc_redfish_resource.robot
5Resource ../../lib/bmc_redfish_utils.robot
6Resource ../../lib/openbmc_ffdc.robot
7Library ../../lib/gen_robot_valid.py
8
9Suite Setup Suite Setup Execution
10Suite Teardown Suite Teardown Execution
11Test Setup Printn
12Test Teardown Test Teardown Execution
13
14
15*** Test Cases ***
16
17Verify Power Supplies Input Watts
18 [Documentation] Verify there are no invalid power supply input watt records.
19 [Tags] Verify_Power_Supplies_Input_Watts
20 [Template] Verify Watts Record
21
22 # record_type redfish_uri reading_type
Marissa Garza6f7958a2019-08-13 14:58:05 -050023 PowerSupplies ${REDFISH_CHASSIS_POWER_URI} PowerInputWatts
Marissa Garza6e3f9ec2019-07-24 15:31:26 -050024
25
26Verify Power Supplies Input Output Voltages
27 [Documentation] Verify there are no invalid power supply voltage records.
28 [Tags] Verify_Power_Supplies_Input_Output_Voltages
29 [Template] Verify Voltage Records
30
31 # record_type redfish_uri reading_type
Marissa Garza6f7958a2019-08-13 14:58:05 -050032 Voltages ${REDFISH_CHASSIS_POWER_URI} ReadingVolts
Marissa Garza6e3f9ec2019-07-24 15:31:26 -050033
34
35*** Keywords ***
36
37Verify Watts Record
38 [Documentation] Verify the power watt records.
39 [Arguments] ${record_type} ${redfish_uri} ${reading_type}
40
41 # Description of Arguments(s):
42 # record_type The sensor record type (e.g. "PowerSupplies")
Marissa Garza6f7958a2019-08-13 14:58:05 -050043 # redfish_uri The power supply URI (e.g. /redfish/v1/Chassis/chassis/Power)
Marissa Garza6e3f9ec2019-07-24 15:31:26 -050044 # reading_type The power watt readings (e.g. "PowerInputWatts")
45
46 Verify Valid Records ${record_type} ${redfish_uri} ${reading_type}
47
48
49Verify Voltage Records
50 [Documentation] Verify the power voltage records.
51 [Arguments] ${record_type} ${redfish_uri} ${reading_type}
52
53 # Description of Arguments(s):
54 # record_type The sensor record type (e.g. "Voltages")
Marissa Garza6f7958a2019-08-13 14:58:05 -050055 # redfish_uri The power supply URI (e.g. /redfish/v1/Chassis/chassis/Power)
Marissa Garza6e3f9ec2019-07-24 15:31:26 -050056 # reading_type The power voltage readings (e.g. "ReadingVolts")
57
58 Verify Valid Records ${record_type} ${redfish_uri} ${reading_type}
59
Marissa Garzad76b1422019-09-13 16:31:54 -050060 ${records}= Redfish.Get Attribute ${redfish_uri} ${record_type}
Marissa Garza6e3f9ec2019-07-24 15:31:26 -050061
62 ${invalid_records}= Evaluate
63 ... [x for x in ${records} if not x['LowerThresholdNonCritical'] <= x['${reading_type}'] <= x['UpperThresholdNonCritical']]
64
Marissa Garzad76b1422019-09-13 16:31:54 -050065 Valid Length invalid_records max_length=0
Marissa Garza6e3f9ec2019-07-24 15:31:26 -050066
67Suite Teardown Execution
68 [Documentation] Do the post suite teardown.
69
70 Redfish.Logout
71
72
73Suite Setup Execution
74 [Documentation] Do test case setup tasks.
75
76 Printn
Marissa Garza6f7958a2019-08-13 14:58:05 -050077 Redfish Power On stack_mode=skip
Marissa Garza6e3f9ec2019-07-24 15:31:26 -050078 Redfish.Login
79
80
81Test Teardown Execution
82 [Documentation] Do the post test teardown.
83
84 FFDC On Test Case Fail