George Keishing | 0657247 | 2017-09-01 11:33:01 -0500 | [diff] [blame] | 1 | *** Settings *** |
Gunnar Mills | 917ba1a | 2018-04-08 16:42:12 -0500 | [diff] [blame] | 2 | Documentation Suite to test hardware sensors. |
George Keishing | 0657247 | 2017-09-01 11:33:01 -0500 | [diff] [blame] | 3 | |
| 4 | Resource ../lib/utils.robot |
| 5 | Resource ../lib/boot_utils.robot |
| 6 | Resource ../lib/state_manager.robot |
| 7 | Resource ../lib/openbmc_ffdc.robot |
George Keishing | dcf746b | 2018-02-06 12:43:44 -0600 | [diff] [blame] | 8 | Resource ../lib/ipmi_client.robot |
| 9 | Variables ../data/ipmi_raw_cmd_table.py |
George Keishing | 0657247 | 2017-09-01 11:33:01 -0500 | [diff] [blame] | 10 | |
George Keishing | 8bf8ed7 | 2017-12-07 04:01:45 -0600 | [diff] [blame] | 11 | Suite Setup Suite Setup Execution |
| 12 | Test Teardown Test Teardown Execution |
George Keishing | 0657247 | 2017-09-01 11:33:01 -0500 | [diff] [blame] | 13 | |
| 14 | *** Test Cases *** |
| 15 | |
Steven Sombar | eabeccf | 2018-09-06 11:41:12 -0500 | [diff] [blame] | 16 | |
George Keishing | 0657247 | 2017-09-01 11:33:01 -0500 | [diff] [blame] | 17 | Verify System Ambient Temperature |
| 18 | [Documentation] Check the ambient sensor temperature. |
| 19 | [Tags] Verify_System_Ambient_Temperature |
| 20 | |
| 21 | # Example: |
| 22 | # /xyz/openbmc_project/sensors/temperature/ambient |
| 23 | # { |
| 24 | # "Scale": -3, |
| 25 | # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.DegreesC", |
| 26 | # "Value": 25767 |
| 27 | # } |
| 28 | |
| 29 | ${temp_data}= Read Properties ${SENSORS_URI}temperature/ambient |
| 30 | Should Be True ${temp_data["Scale"]} == ${-3} |
| 31 | Should Be Equal As Strings |
| 32 | ... ${temp_data["Unit"]} xyz.openbmc_project.Sensor.Value.Unit.DegreesC |
| 33 | Should Be True ${temp_data["Value"]/1000} <= ${50} |
| 34 | ... msg=System working temperature crossed 50 degree celsius. |
| 35 | |
Steven Sombar | eabeccf | 2018-09-06 11:41:12 -0500 | [diff] [blame] | 36 | |
Sweta Potthuri | cca07de | 2017-09-26 06:14:23 -0500 | [diff] [blame] | 37 | Verify Fan Sensors Attributes |
| 38 | [Documentation] Check fan attributes. |
| 39 | [Tags] Verify_Fan_Sensor_Attributes |
George Keishing | 28f7405 | 2020-07-20 09:02:50 -0500 | [diff] [blame] | 40 | |
Sweta Potthuri | cca07de | 2017-09-26 06:14:23 -0500 | [diff] [blame] | 41 | # Example: |
George Keishing | 28f7405 | 2020-07-20 09:02:50 -0500 | [diff] [blame] | 42 | # "/xyz/openbmc_project/sensors/fan_tach/fan0_0", |
| 43 | # "/xyz/openbmc_project/sensors/fan_tach/fan0_1", |
| 44 | # "/xyz/openbmc_project/sensors/fan_tach/fan1_0", |
| 45 | # "/xyz/openbmc_project/sensors/fan_tach/fan1_1", |
| 46 | # "/xyz/openbmc_project/sensors/fan_tach/fan2_0", |
| 47 | # "/xyz/openbmc_project/sensors/fan_tach/fan2_1", |
| 48 | # "/xyz/openbmc_project/sensors/fan_tach/fan3_0", |
| 49 | # "/xyz/openbmc_project/sensors/fan_tach/fan3_1" |
| 50 | |
Sweta Potthuri | cca07de | 2017-09-26 06:14:23 -0500 | [diff] [blame] | 51 | ${fans}= Get Endpoint Paths /xyz/openbmc_project/sensors/ fan* |
| 52 | |
| 53 | # Access the properties of the fan and it should contain |
| 54 | # the following entries: |
George Keishing | 28f7405 | 2020-07-20 09:02:50 -0500 | [diff] [blame] | 55 | # /xyz/openbmc_project/sensors/fan_tach/fan0_0 |
Sweta Potthuri | cca07de | 2017-09-26 06:14:23 -0500 | [diff] [blame] | 56 | # { |
George Keishing | 28f7405 | 2020-07-20 09:02:50 -0500 | [diff] [blame] | 57 | # "Functional": true, |
| 58 | # "MaxValue": 0.0, |
| 59 | # "MinValue": 0.0, |
| 60 | # "Target": 10500, |
Sweta Potthuri | cca07de | 2017-09-26 06:14:23 -0500 | [diff] [blame] | 61 | # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.RPMS", |
George Keishing | 28f7405 | 2020-07-20 09:02:50 -0500 | [diff] [blame] | 62 | # "Value": 0.0 |
Sweta Potthuri | cca07de | 2017-09-26 06:14:23 -0500 | [diff] [blame] | 63 | # } |
| 64 | |
Sushil Singh | 5dbaf9d | 2020-06-19 05:43:20 -0500 | [diff] [blame] | 65 | FOR ${entry} IN @{fans} |
| 66 | ${resp}= OpenBMC Get Request ${entry} |
| 67 | ${json}= To JSON ${resp.content} |
Sushil Singh | 5dbaf9d | 2020-06-19 05:43:20 -0500 | [diff] [blame] | 68 | Run Keyword And Ignore Error Should Be True ${json["data"]["Target"]} >= 0 |
George Keishing | 28f7405 | 2020-07-20 09:02:50 -0500 | [diff] [blame] | 69 | Run Keyword And Ignore Error Should Be Equal As Strings |
| 70 | ... ${json["data"]["Unit"]} xyz.openbmc_project.Sensor.Value.Unit.RPMS |
Sushil Singh | 5dbaf9d | 2020-06-19 05:43:20 -0500 | [diff] [blame] | 71 | Should Be True ${json["data"]["Value"]} >= 0 |
| 72 | END |
Sweta Potthuri | cca07de | 2017-09-26 06:14:23 -0500 | [diff] [blame] | 73 | |
| 74 | Verify PCIE Sensors Attributes |
| 75 | [Documentation] Probe PCIE attributes. |
| 76 | [Tags] Verify_PCIE_Sensor_Attributes |
| 77 | # Example: |
| 78 | # /xyz/openbmc_project/sensors/temperature/pcie |
| 79 | ${temp_pcie}= Get Endpoint Paths /xyz/openbmc_project/sensors/ pcie |
| 80 | |
| 81 | # Access the properties of the PCIE and it should contain |
| 82 | # the following entries: |
| 83 | # /xyz/openbmc_project/sensors/temperature/pcie |
| 84 | # { |
| 85 | # "Scale": -3, |
| 86 | # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.DegreesC", |
| 87 | # "Value": 29625 |
| 88 | # } |
| 89 | |
| 90 | |
Sushil Singh | 5dbaf9d | 2020-06-19 05:43:20 -0500 | [diff] [blame] | 91 | FOR ${entry} IN @{temp_pcie} |
| 92 | ${resp}= OpenBMC Get Request ${entry} |
| 93 | ${json}= To JSON ${resp.content} |
| 94 | Should Be True ${json["data"]["Scale"]} == -3 |
| 95 | Should Be Equal As Strings ${json["data"]["Unit"]} xyz.openbmc_project.Sensor.Value.Unit.DegreesC |
| 96 | ${temp_in_DegreeC}= Evaluate ${json["data"]["Value"]} / 1000 |
| 97 | Should Be True ${temp_in_DegreeC} > 0 |
| 98 | END |
Sweta Potthuri | cca07de | 2017-09-26 06:14:23 -0500 | [diff] [blame] | 99 | |
| 100 | |
| 101 | Verify Rail Voltage Sensors Attributes |
| 102 | [Documentation] Check rail voltage attributes. |
| 103 | [Tags] Verify_Rail_Voltage_Sensor_Attributes |
| 104 | # Example of one of the entries returned by 'Get Endpoint Paths': |
| 105 | # /xyz/openbmc_project/sensors/voltage/rail_1_voltage |
| 106 | # /xyz/openbmc_project/sensors/voltage/rail_2_voltage |
| 107 | ${temp_rail}= Get Endpoint Paths /xyz/openbmc_project/sensors/ rail* |
| 108 | |
| 109 | # Example: |
| 110 | # Access the properties of the rail voltage and it should contain |
| 111 | # the following entries: |
| 112 | # "/xyz/openbmc_project/sensors/voltage/rail_1_voltage": |
| 113 | # { |
| 114 | # "Scale": -3, |
| 115 | # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.Volts", |
| 116 | # "Value": 5097 |
| 117 | # }, |
| 118 | |
Sushil Singh | 5dbaf9d | 2020-06-19 05:43:20 -0500 | [diff] [blame] | 119 | FOR ${entry} IN @{temp_rail} |
| 120 | ${resp}= OpenBMC Get Request ${entry} |
| 121 | ${json}= To JSON ${resp.content} |
| 122 | Should Be True ${json["data"]["Scale"]} == -3 |
| 123 | Should Be Equal As Strings ${json["data"]["Unit"]} xyz.openbmc_project.Sensor.Value.Unit.Volts |
| 124 | ${volts}= Evaluate ${json["data"]["Value"]} / 1000 |
| 125 | Should Be True ${volts} > 0 |
| 126 | END |
Sweta Potthuri | cca07de | 2017-09-26 06:14:23 -0500 | [diff] [blame] | 127 | |
| 128 | |
| 129 | Verify VDN Temperature Sensors Attributes |
| 130 | [Documentation] Check vdn temperature attributes. |
| 131 | [Tags] Verify_VDN_Temperature_Sensors_Attributes |
| 132 | # Example of one of the entries returned by 'Get Endpoint Paths': |
| 133 | # /xyz/openbmc_project/sensors/temperature/p0_vdn_temp |
| 134 | ${temp_vdn}= Get Endpoint Paths /xyz/openbmc_project/sensors/ *_vdn_temp |
| 135 | |
| 136 | # Example: |
| 137 | # Access the properties of the rail voltage and it should contain |
| 138 | # the following entries: |
| 139 | # /xyz/openbmc_project/sensors/temperature/p0_vdn_temp |
| 140 | # { |
| 141 | # "Scale": -3, |
| 142 | # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.DegreesC", |
| 143 | # "Value": 3000 |
| 144 | # } |
| 145 | |
Sushil Singh | 5dbaf9d | 2020-06-19 05:43:20 -0500 | [diff] [blame] | 146 | FOR ${entry} IN @{temp_vdn} |
| 147 | ${resp}= OpenBMC Get Request ${entry} |
| 148 | ${json}= To JSON ${resp.content} |
| 149 | Should Be True ${json["data"]["Scale"]} == -3 |
| 150 | Should Be Equal As Strings ${json["data"]["Unit"]} xyz.openbmc_project.Sensor.Value.Unit.DegreesC |
| 151 | ${vdn_temp}= Evaluate ${json["data"]["Value"]} / 1000 |
| 152 | Should Be True ${vdn_temp} > 0 |
| 153 | END |
Sweta Potthuri | cca07de | 2017-09-26 06:14:23 -0500 | [diff] [blame] | 154 | |
| 155 | Verify VCS Temperature Sensors Attributes |
| 156 | [Documentation] Check vcs temperature attributes. |
| 157 | [Tags] Verify_VCS_Temperature_Sensors_Attributes |
| 158 | # Example of one of the entries returned by 'Get Endpoint Paths': |
| 159 | # /xyz/openbmc_project/sensors/temperature/p0_vcs_temp |
| 160 | ${temp_vcs}= Get Endpoint Paths /xyz/openbmc_project/sensors/ *_vcs_temp |
| 161 | |
| 162 | # Example: |
| 163 | # Access the properties of the rail voltage and it should contain |
| 164 | # the following entries: |
| 165 | # /xyz/openbmc_project/sensors/temperature/p0_vcs_temp |
| 166 | # { |
| 167 | # "Scale": -3, |
| 168 | # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.DegreesC", |
| 169 | # "Value": 31000 |
| 170 | # }, |
| 171 | |
| 172 | |
Sushil Singh | 5dbaf9d | 2020-06-19 05:43:20 -0500 | [diff] [blame] | 173 | FOR ${entry} IN @{temp_vcs} |
| 174 | ${resp}= OpenBMC Get Request ${entry} |
| 175 | ${json}= To JSON ${resp.content} |
| 176 | Should Be True ${json["data"]["Scale"]} == -3 |
| 177 | Should Be Equal As Strings ${json["data"]["Unit"]} xyz.openbmc_project.Sensor.Value.Unit.DegreesC |
| 178 | ${vcs_temp}= Evaluate ${json["data"]["Value"]} / 1000 |
| 179 | Should Be True ${vcs_temp} > 0 |
| 180 | END |
Sweta Potthuri | cca07de | 2017-09-26 06:14:23 -0500 | [diff] [blame] | 181 | |
| 182 | |
| 183 | Verify VDD Temperature Sensors Attributes |
| 184 | [Documentation] Check vdd temperature attributes. |
| 185 | [Tags] Verify_VDD_Temperature_Sensors_Attributes |
| 186 | # Example of one of the entries returned by 'Get Endpoint Paths': |
| 187 | # /xyz/openbmc_project/sensors/temperature/p0_vdd_temp |
| 188 | ${temp_vdd}= Get Endpoint Paths /xyz/openbmc_project/sensors/ *_vdd_temp |
| 189 | |
| 190 | # Example: |
| 191 | # Access the properties of the rail voltage and it should contain |
| 192 | # the following entries: |
| 193 | # /xyz/openbmc_project/sensors/temperature/p0_vdd_temp |
| 194 | # { |
| 195 | # "Scale": -3, |
| 196 | # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.DegreesC", |
| 197 | # "Value": 4000 |
| 198 | # } |
| 199 | |
Sushil Singh | 5dbaf9d | 2020-06-19 05:43:20 -0500 | [diff] [blame] | 200 | FOR ${entry} IN @{temp_vdd} |
| 201 | ${resp}= OpenBMC Get Request ${entry} |
| 202 | ${json}= To JSON ${resp.content} |
| 203 | Should Be True ${json["data"]["Scale"]} == -3 |
| 204 | Should Be Equal As Strings ${json["data"]["Unit"]} xyz.openbmc_project.Sensor.Value.Unit.DegreesC |
| 205 | ${vdd_temp}= Evaluate ${json["data"]["Value"]} / 1000 |
| 206 | Should Be True ${vdd_temp} > 0 |
| 207 | END |
Sweta Potthuri | cca07de | 2017-09-26 06:14:23 -0500 | [diff] [blame] | 208 | |
| 209 | |
| 210 | Verify VDDR Temperature Sensors Attributes |
| 211 | [Documentation] Check vddr temperature attributes. |
| 212 | [Tags] Verify_VDDR_Temperature_Sensors_Attributes |
| 213 | # Example of one of the entries returned by 'Get Endpoint Paths': |
| 214 | # /xyz/openbmc_project/sensors/temperature/p0_vddr_temp |
| 215 | ${temp_vddr}= |
| 216 | ... Get Endpoint Paths /xyz/openbmc_project/sensors/ *_vddr_temp |
| 217 | |
| 218 | # Example: |
| 219 | # Access the properties of the rail voltage and it should contain |
| 220 | # the following entries: |
| 221 | # /xyz/openbmc_project/sensors/temperature/p0_vddr_temp |
| 222 | # { |
| 223 | # "Scale": -3, |
| 224 | # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.DegreesC", |
| 225 | # "Value": 4000 |
| 226 | # } |
| 227 | |
Sushil Singh | 5dbaf9d | 2020-06-19 05:43:20 -0500 | [diff] [blame] | 228 | FOR ${entry} IN @{temp_vddr} |
| 229 | ${resp}= OpenBMC Get Request ${entry} |
| 230 | ${json}= To JSON ${resp.content} |
| 231 | Should Be True ${json["data"]["Scale"]} == -3 |
| 232 | Should Be Equal As Strings ${json["data"]["Unit"]} xyz.openbmc_project.Sensor.Value.Unit.DegreesC |
| 233 | ${vddr_temp}= Evaluate ${json["data"]["Value"]} / 1000 |
| 234 | Should Be True ${vddr_temp} > 0 |
| 235 | END |
George Keishing | 0657247 | 2017-09-01 11:33:01 -0500 | [diff] [blame] | 236 | |
Jayashree-D | ea98230 | 2020-07-21 16:44:13 +0530 | [diff] [blame] | 237 | Verify Power Sensors Attributes |
| 238 | [Documentation] Check power sensor attributes. |
| 239 | [Tags] Verify_Power_Sensor_Attributes |
| 240 | # Example: |
| 241 | # /xyz/openbmc_project/sensors/power/power_1 |
| 242 | # /xyz/openbmc_project/sensors/power/power_2 |
| 243 | # /xyz/openbmc_project/sensors/power/power0 |
| 244 | # /xyz/openbmc_project/sensors/power/POWER1 |
| 245 | # /xyz/openbmc_project/sensors/power/POWER_1 |
| 246 | |
| 247 | ${power}= Get Endpoint Paths /xyz/openbmc_project/sensors/ power* |
| 248 | |
| 249 | # Access the properties of the power sensors and it should contain |
| 250 | # the following entries: |
| 251 | # /xyz/openbmc_project/sensors/power/power_1 |
| 252 | # { |
| 253 | # "MaxValue": 255.0, |
| 254 | # "MinValue": 0.0, |
| 255 | # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.Watts", |
| 256 | # "Value": 0.0 |
| 257 | # } |
| 258 | |
| 259 | FOR ${entry} IN @{power} |
| 260 | ${resp}= OpenBMC Get Request ${entry} |
| 261 | ${json}= To JSON ${resp.content} |
| 262 | Run Keyword And Ignore Error Should Be True ${json["data"]["Target"]} >= 0 |
| 263 | Should Be True ${json["data"]["Value"]} >= 0 |
| 264 | END |
George Keishing | 8bf8ed7 | 2017-12-07 04:01:45 -0600 | [diff] [blame] | 265 | |
Jayashree-D | fe793fa | 2020-07-27 20:26:09 +0530 | [diff] [blame] | 266 | |
| 267 | Verify Voltage Sensors Attributes |
| 268 | [Documentation] Check voltage sensors attributes. |
| 269 | [Tags] Verify_Voltage_Sensor_Attributes |
| 270 | |
| 271 | # Example: |
| 272 | # "/xyz/openbmc_project/sensors/voltage/voltage0", |
George Keishing | 16b3c7b | 2021-01-28 09:23:37 -0600 | [diff] [blame] | 273 | # "/xyz/openbmc_project/sensors/voltage/voltage_1", |
Jayashree-D | fe793fa | 2020-07-27 20:26:09 +0530 | [diff] [blame] | 274 | # "/xyz/openbmc_project/sensors/voltage/VOLTAGE_2", |
| 275 | # "/xyz/openbmc_project/sensors/voltage/VOLTAGE1", |
| 276 | # "/xyz/openbmc_project/sensors/voltage/voltage". |
| 277 | |
| 278 | ${voltage}= Get Endpoint Paths /xyz/openbmc_project/sensors/voltage/ * |
| 279 | |
| 280 | # Access the properties of the voltage sensors and it should contain |
| 281 | # the following entries: |
| 282 | # /xyz/openbmc_project/sensors/voltage/voltage0 |
| 283 | # { |
| 284 | # "MaxValue": 255.0, |
| 285 | # "MinValue": 0.0, |
| 286 | # "Unit": xyz.openbmc_project.Sensor.Value.Unit.Volts |
| 287 | # "Value": 0.0 |
| 288 | # } |
| 289 | |
| 290 | FOR ${entry} IN @{voltage} |
| 291 | ${resp}= OpenBMC Get Request ${entry} |
| 292 | ${json}= To JSON ${resp.content} |
| 293 | Run Keyword And Ignore Error Should Be Equal As Strings |
| 294 | ... ${json["data"]["Unit"]} xyz.openbmc_project.Sensor.Value.Unit.Volts |
| 295 | Run Keyword And Ignore Error Should Be True ${json["data"]["Value"]} >= 0 |
| 296 | END |
| 297 | |
| 298 | |
| 299 | Verify Current Sensors Attributes |
| 300 | [Documentation] Check current sensors attributes. |
| 301 | [Tags] Verify_Current_Sensor_Attributes |
| 302 | |
| 303 | # Example: |
| 304 | # "/xyz/openbmc_project/sensors/current/current0", |
| 305 | # "/xyz/openbmc_project/sensors/current/current_1", |
| 306 | # "/xyz/openbmc_project/sensors/current/CURRENT_2", |
| 307 | # "/xyz/openbmc_project/sensors/current/CURRENT1", |
| 308 | # "/xyz/openbmc_project/sensors/current/current". |
| 309 | |
| 310 | ${current}= Get Endpoint Paths /xyz/openbmc_project/sensors/ curr* |
| 311 | |
| 312 | # Access the properties of the current sensors and it should contain |
| 313 | # the following entries: |
| 314 | # /xyz/openbmc_project/sensors/current/current0 |
| 315 | # { |
| 316 | # "MaxValue": 255.0, |
| 317 | # "MinValue": 0.0, |
| 318 | # "Unit": xyz.openbmc_project.Sensor.Value.Unit.Amperes |
| 319 | # "Value": 0.0 |
| 320 | # } |
| 321 | |
| 322 | FOR ${entry} IN @{current} |
| 323 | ${resp}= OpenBMC Get Request ${entry} |
| 324 | ${json}= To JSON ${resp.content} |
| 325 | Run Keyword And Ignore Error Should Be Equal As Strings |
| 326 | ... ${json["data"]["Unit"]} xyz.openbmc_project.Sensor.Value.Unit.Amperes |
| 327 | Should Be True ${json["data"]["Value"]} >= 0 |
| 328 | END |
| 329 | |
| 330 | |
Steven Sombar | eabeccf | 2018-09-06 11:41:12 -0500 | [diff] [blame] | 331 | Verify Power Redundancy Using REST |
| 332 | [Documentation] Verify power redundancy is enabled. |
| 333 | [Tags] Verify_Power_Redundancy_Using_REST |
George Keishing | 8bf8ed7 | 2017-12-07 04:01:45 -0600 | [diff] [blame] | 334 | |
| 335 | # Example: |
| 336 | # /xyz/openbmc_project/sensors/chassis/PowerSupplyRedundancy |
| 337 | # { |
| 338 | # "error": 0, |
| 339 | # "units": "", |
| 340 | # "value": "Enabled" |
| 341 | # } |
| 342 | |
Steven Sombar | eabeccf | 2018-09-06 11:41:12 -0500 | [diff] [blame] | 343 | # Power Redundancy is a read-only attribute. It cannot be set. |
Steven Sombar | 27c1ad4 | 2018-09-11 14:44:25 -0500 | [diff] [blame] | 344 | |
| 345 | # Pass if sensor is in /xyz and it's enabled. |
| 346 | ${redundancy_setting}= Read Attribute |
| 347 | ... ${OPENBMC_BASE_URI}control/power_supply_redundancy |
| 348 | ... PowerSupplyRedundancyEnabled |
| 349 | Should Be Equal As Integers ${redundancy_setting} ${1} |
| 350 | ... msg=PowerSupplyRedundancyEnabled not set as expected. |
George Keishing | 8bf8ed7 | 2017-12-07 04:01:45 -0600 | [diff] [blame] | 351 | |
| 352 | |
Steven Sombar | eabeccf | 2018-09-06 11:41:12 -0500 | [diff] [blame] | 353 | Verify Power Redundancy Using IPMI |
Steven Sombar | 27c1ad4 | 2018-09-11 14:44:25 -0500 | [diff] [blame] | 354 | [Documentation] Verify IPMI reports Power Redundancy is enabled. |
Steven Sombar | eabeccf | 2018-09-06 11:41:12 -0500 | [diff] [blame] | 355 | [Tags] Verify_Power_Redundancy_Using_IPMI |
George Keishing | dcf746b | 2018-02-06 12:43:44 -0600 | [diff] [blame] | 356 | |
| 357 | # Refer to data/ipmi_raw_cmd_table.py for command definition. |
Steven Sombar | eabeccf | 2018-09-06 11:41:12 -0500 | [diff] [blame] | 358 | # Power Redundancy is a read-only attribute. It cannot be set. |
George Keishing | dcf746b | 2018-02-06 12:43:44 -0600 | [diff] [blame] | 359 | |
| 360 | ${output}= Run IPMI Standard Command |
| 361 | ... raw ${IPMI_RAW_CMD['power_supply_redundancy']['Get'][0]} |
| 362 | |
Steven Sombar | 27c1ad4 | 2018-09-11 14:44:25 -0500 | [diff] [blame] | 363 | ${scanning}= Set Variable |
| 364 | ... ${IPMI_RAW_CMD['power_supply_redundancy']['Get'][5]} |
| 365 | ${no_scanning}= Set Variable |
George Keishing | dcf746b | 2018-02-06 12:43:44 -0600 | [diff] [blame] | 366 | ... ${IPMI_RAW_CMD['power_supply_redundancy']['Get'][3]} |
Steven Sombar | 27c1ad4 | 2018-09-11 14:44:25 -0500 | [diff] [blame] | 367 | |
| 368 | ${enabled_scanning}= Evaluate $scanning in $output |
| 369 | ${enabled_no_scanning}= Evaluate $no_scanning in $output |
| 370 | |
| 371 | # Either enabled_scanning or enabled_noscanning should be True. |
| 372 | Should Be True ${enabled_scanning} or ${enabled_no_scanning} |
| 373 | ... msg=Failed IPMI power redundancy check, result=${output}. |
George Keishing | dcf746b | 2018-02-06 12:43:44 -0600 | [diff] [blame] | 374 | |
| 375 | |
George Keishing | 0657247 | 2017-09-01 11:33:01 -0500 | [diff] [blame] | 376 | *** Keywords *** |
| 377 | |
George Keishing | 8bf8ed7 | 2017-12-07 04:01:45 -0600 | [diff] [blame] | 378 | Suite Setup Execution |
George Keishing | 0657247 | 2017-09-01 11:33:01 -0500 | [diff] [blame] | 379 | [Documentation] Do the initial test suite setup. |
| 380 | # - Power off. |
| 381 | # - Boot Host. |
| 382 | REST Power Off stack_mode=skip |
| 383 | REST Power On |
| 384 | |
George Keishing | 8bf8ed7 | 2017-12-07 04:01:45 -0600 | [diff] [blame] | 385 | Test Teardown Execution |
George Keishing | 0657247 | 2017-09-01 11:33:01 -0500 | [diff] [blame] | 386 | [Documentation] Do the post test teardown. |
| 387 | # - Capture FFDC on test failure. |
| 388 | # - Delete error logs. |
| 389 | # - Close all open SSH connections. |
| 390 | |
George Keishing | 8bf8ed7 | 2017-12-07 04:01:45 -0600 | [diff] [blame] | 391 | FFDC On Test Case Fail |
George Keishing | 32fe4e1 | 2018-07-13 05:06:47 -0500 | [diff] [blame] | 392 | Delete All Error Logs |
George Keishing | 8bf8ed7 | 2017-12-07 04:01:45 -0600 | [diff] [blame] | 393 | Close All Connections |