blob: 60de795c244a4e013ebd918c8e8dd1891641e044 [file] [log] [blame]
Rahul Maheshwarifdd5ff62017-08-01 04:15:03 -05001*** Settings ***
2Documentation This suite is for testing general IPMI functions.
3
4Resource ../../lib/ipmi_client.robot
5Resource ../../lib/openbmc_ffdc.robot
George Keishing0825a112018-03-30 10:48:07 -05006Resource ../../lib/boot_utils.robot
George Keishing78ce8dc2018-03-30 11:49:06 -05007Resource ../../lib/utils.robot
Sweta Potthurif39022d2018-02-06 03:40:07 -06008Resource ../../lib/bmc_network_utils.robot
George Keishingd6273802018-09-07 07:06:53 -05009Resource ../../lib/logging_utils.robot
George Keishing78ce8dc2018-03-30 11:49:06 -050010Library ../../lib/ipmi_utils.py
George Keishing0825a112018-03-30 10:48:07 -050011Variables ../../data/ipmi_raw_cmd_table.py
Rahul Maheshwaridf6f05d2018-09-04 03:48:37 -050012Library ../../lib/gen_misc.py
Tony Lee9bca44b2019-12-13 09:34:26 +080013Library ../../lib/gen_robot_valid.py
Rahul Maheshwarifdd5ff62017-08-01 04:15:03 -050014
Michael Walshc9eb34e2019-01-23 11:08:43 -060015Test Setup Log to Console ${EMPTY}
Rahul Maheshwarifdd5ff62017-08-01 04:15:03 -050016Test Teardown FFDC On Test Case Fail
17
18*** Variables ***
19
Rahul Maheshwari901dcde2018-02-06 03:14:31 -060020${allowed_temp_diff}= ${1}
Rahul Maheshwari615da152018-02-13 23:53:36 -060021${allowed_power_diff}= ${10}
Sweta Potthuri5c6c72e2018-01-23 05:48:35 -060022
Rahul Maheshwarifdd5ff62017-08-01 04:15:03 -050023*** Test Cases ***
24
Sweta Potthuri0cc60502018-01-24 00:36:17 -060025Verify Chassis Identify via IPMI
26 [Documentation] Verify "chassis identify" using IPMI command.
27 [Tags] Verify_Chassis_Identify_via_IPMI
28
29 # Set to default "chassis identify" and verify that LED blinks for 15s.
30 Run IPMI Standard Command chassis identify
Alvin Wang32f7b3d2019-07-25 02:05:39 -050031 Verify Identify LED State ${1}
Sweta Potthuri0cc60502018-01-24 00:36:17 -060032
Tony Lee2afe9982020-02-11 17:31:14 +080033 Sleep 18s
Alvin Wang32f7b3d2019-07-25 02:05:39 -050034 Verify Identify LED State ${0}
Sweta Potthuri0cc60502018-01-24 00:36:17 -060035
36 # Set "chassis identify" to 10s and verify that the LED blinks for 10s.
37 Run IPMI Standard Command chassis identify 10
Alvin Wang32f7b3d2019-07-25 02:05:39 -050038 Verify Identify LED State ${1}
Sweta Potthuri0cc60502018-01-24 00:36:17 -060039
Tony Lee2afe9982020-02-11 17:31:14 +080040 Sleep 12s
Alvin Wang32f7b3d2019-07-25 02:05:39 -050041 Verify Identify LED State ${0}
Sweta Potthuri0cc60502018-01-24 00:36:17 -060042
Sweta Potthurif39022d2018-02-06 03:40:07 -060043
Sweta Potthuri0cc60502018-01-24 00:36:17 -060044Verify Chassis Identify Off And Force Identify On via IPMI
45 [Documentation] Verify "chassis identify" off
46 ... and "force identify on" via IPMI.
47 [Tags] Verify_Chassis_Identify_Off_And_Force_Identify_On_via_IPMI
48
49 # Set the LED to "Force Identify On".
50 Run IPMI Standard Command chassis identify force
Alvin Wang32f7b3d2019-07-25 02:05:39 -050051 Verify Identify LED State ${1}
Sweta Potthuri0cc60502018-01-24 00:36:17 -060052
53 # Set "chassis identify" to 0 and verify that the LED turns off.
54 Run IPMI Standard Command chassis identify 0
Alvin Wang32f7b3d2019-07-25 02:05:39 -050055 Verify Identify LED State ${0}
Sweta Potthuri0cc60502018-01-24 00:36:17 -060056
Sweta Potthurif39022d2018-02-06 03:40:07 -060057
Sweta Potthuri7d3af3c2018-01-29 03:07:07 -060058Test Watchdog Reset Via IPMI And Verify Using REST
59 [Documentation] Test watchdog reset via IPMI and verify using REST.
60 [Tags] Test_Watchdog_Reset_Via_IPMI_And_Verify_Using_REST
61
62 Initiate Host Boot
63
64 Set Watchdog Enabled Using REST ${1}
65
66 Watchdog Object Should Exist
67
68 # Resetting the watchdog via IPMI.
69 Run IPMI Standard Command mc watchdog reset
70
71 # Verify the watchdog is reset using REST after an interval of 1000ms.
72 Sleep 1000ms
73 ${watchdog_time_left}=
74 ... Read Attribute ${HOST_WATCHDOG_URI} TimeRemaining
75 Should Be True
76 ... ${watchdog_time_left}<${1200000} and ${watchdog_time_left}>${2000}
77 ... msg=Watchdog timer didn't reset.
78
Sweta Potthurif39022d2018-02-06 03:40:07 -060079
Sweta Potthuri7d3af3c2018-01-29 03:07:07 -060080Test Watchdog Off Via IPMI And Verify Using REST
81 [Documentation] Test watchdog off via IPMI and verify using REST.
82 [Tags] Test_Watchdog_Off_Via_IPMI_And_Verify_Using_REST
83
84 Initiate Host Boot
85
86 Set Watchdog Enabled Using REST ${1}
87
88 Watchdog Object Should Exist
89
90 # Turn off the watchdog via IPMI.
91 Run IPMI Standard Command mc watchdog off
92
93 # Verify the watchdog is off using REST
94 ${watchdog_state}= Read Attribute ${HOST_WATCHDOG_URI} Enabled
95 Should Be Equal ${watchdog_state} ${0}
96 ... msg=msg=Verification failed for watchdog off check.
Rahul Maheshwari901dcde2018-02-06 03:14:31 -060097
98
Sweta Potthuri78dd1e12018-02-21 00:03:33 -060099Test Power Reading Via IPMI With Host Off
100 [Documentation] Test power reading via IPMI with host off state and
101 ... verify using REST.
102 [Tags] Test_Power_Reading_Via_IPMI_With_Host_Off
Rahul Maheshwari615da152018-02-13 23:53:36 -0600103
Sweta Potthuri78dd1e12018-02-21 00:03:33 -0600104 REST Power Off stack_mode=skip quiet=1
Rahul Maheshwari615da152018-02-13 23:53:36 -0600105
George Keishing04bf06c2018-10-05 08:28:50 -0500106 Wait Until Keyword Succeeds 1 min 30 sec Verify Power Reading
George Keishinge78f1fd2018-09-04 13:34:59 -0500107
108
109Test Power Reading Via IPMI With Host Booted
110 [Documentation] Test power reading via IPMI with host booted state and
111 ... verify using REST.
112 [Tags] Test_Power_Reading_Via_IPMI_With_Host_Booted
113
114 REST Power On stack_mode=skip quiet=1
115
116 # For a good power reading take a 3 samples for 15 seconds interval and
117 # average it out.
118
George Keishing04bf06c2018-10-05 08:28:50 -0500119 Wait Until Keyword Succeeds 2 min 30 sec Verify Power Reading
Rahul Maheshwari615da152018-02-13 23:53:36 -0600120
121
Rahul Maheshwariabe13af2018-02-15 22:42:08 -0600122Test Power Reading Via IPMI Raw Command
123 [Documentation] Test power reading via IPMI raw command and verify
124 ... using REST.
125 [Tags] Test_Power_Reading_Via_IPMI_Raw_Command
126
127 # Response data structure of power reading command output via IPMI.
128 # 1 Completion Code. Refer to section 8, DCMI Completion Codes.
129 # 2 Group Extension Identification = DCh
130 # 3:4 Current Power in watts
131
George Keishinge78f1fd2018-09-04 13:34:59 -0500132 REST Power On stack_mode=skip quiet=1
Rahul Maheshwariabe13af2018-02-15 22:42:08 -0600133
George Keishing04bf06c2018-10-05 08:28:50 -0500134 Wait Until Keyword Succeeds 2 min 30 sec Verify Power Reading Via Raw Command
Rahul Maheshwariabe13af2018-02-15 22:42:08 -0600135
136
Rahul Maheshwari91a18ef2018-02-15 04:54:59 -0600137Test Baseboard Temperature Via IPMI
138 [Documentation] Test baseboard temperature via IPMI and verify using REST.
139 [Tags] Test_Baseboard_Temperature_Via_IPMI
140
141 # Example of IPMI dcmi get_temp_reading output:
142 # Entity ID Entity Instance Temp. Readings
143 # Inlet air temperature(40h) 1 +19 C
144 # CPU temperature sensors(41h) 5 +51 C
145 # CPU temperature sensors(41h) 6 +50 C
146 # CPU temperature sensors(41h) 7 +50 C
147 # CPU temperature sensors(41h) 8 +50 C
148 # CPU temperature sensors(41h) 9 +50 C
149 # CPU temperature sensors(41h) 10 +48 C
150 # CPU temperature sensors(41h) 11 +49 C
151 # CPU temperature sensors(41h) 12 +47 C
152 # CPU temperature sensors(41h) 8 +50 C
153 # CPU temperature sensors(41h) 16 +51 C
154 # CPU temperature sensors(41h) 24 +50 C
155 # CPU temperature sensors(41h) 32 +43 C
156 # CPU temperature sensors(41h) 40 +43 C
157 # Baseboard temperature sensors(42h) 1 +35 C
158
159 ${temp_reading}= Run IPMI Standard Command dcmi get_temp_reading -N 10
George Keishing77f1ad22018-07-23 12:39:28 -0500160 Should Contain ${temp_reading} Baseboard temperature sensors
161 ... msg="Unable to get baseboard temperature via DCMI".
Rahul Maheshwari91a18ef2018-02-15 04:54:59 -0600162 ${baseboard_temp_line}=
163 ... Get Lines Containing String ${temp_reading}
164 ... Baseboard temperature case-insensitive=True
165
166 ${baseboard_temp_ipmi}= Fetch From Right ${baseboard_temp_line} +
167 ${baseboard_temp_ipmi}= Remove String ${baseboard_temp_ipmi} ${SPACE}C
168
169 ${baseboard_temp_rest}= Read Attribute
170 ... /xyz/openbmc_project/sensors/temperature/pcie Value
171 ${baseboard_temp_rest}= Evaluate ${baseboard_temp_rest}/1000
172
173 Should Be True
174 ... ${baseboard_temp_rest} - ${baseboard_temp_ipmi} <= ${allowed_temp_diff}
175 ... msg=Baseboard temperature above allowed threshold ${allowed_temp_diff}.
176
177
Rahul Maheshwarife8639b2018-02-05 22:42:24 -0600178Verify Get Device ID
179 [Documentation] Verify get device ID command output.
180 [Tags] Verify_Get_Device_ID
181
182 # Example of get device ID command output:
183 # Device ID : 0
184 # Device Revision : 0
185 # Firmware Revision : 2.01
186 # IPMI Version : 2.0
187 # Manufacturer ID : 42817
188 # Manufacturer Name : Unknown (0xA741)
189 # Product ID : 16975 (0x424f)
190 # Product Name : Unknown (0x424F)
191 # Device Available : yes
192 # Provides Device SDRs : yes
193 # Additional Device Support :
194 # Sensor Device
195 # SEL Device
196 # FRU Inventory Device
197 # Chassis Device
198 # Aux Firmware Rev Info :
George Keishing3511a3f2018-04-19 10:38:30 -0500199 # 0x04
200 # 0x38
Rahul Maheshwarife8639b2018-02-05 22:42:24 -0600201 # 0x00
George Keishing3511a3f2018-04-19 10:38:30 -0500202 # 0x03
Rahul Maheshwarife8639b2018-02-05 22:42:24 -0600203
Tony Lee9bca44b2019-12-13 09:34:26 +0800204 # Verify Manufacturer and Product IDs, etc. directly from json file.
205 ${device_id_config}= Get Device Id Config
Rahul Maheshwarife8639b2018-02-05 22:42:24 -0600206 ${mc_info}= Get MC Info
207
Tony Lee9bca44b2019-12-13 09:34:26 +0800208 Rprint Vars device_id_config mc_info
209 Valid Value ${mc_info['device_id']} [${device_id_config['id']}]
210 Valid Value ${mc_info['device_revision']} [${device_id_config['device_revision']}]
Rahul Maheshwarife8639b2018-02-05 22:42:24 -0600211
Rahul Maheshwaribb9e2572018-04-02 05:24:37 -0500212 # Get firmware revision from mc info command output i.e. 2.01
213 ${ipmi_fw_major_version} ${ipmi_fw_minor_version}=
214 ... Split String ${mc_info['firmware_revision']} .
215 # Convert minor firmware version from BCD format to integer. i.e. 01 to 1
216 ${ipmi_fw_minor_version}= Convert To Integer ${ipmi_fw_minor_version}
Rahul Maheshwarife8639b2018-02-05 22:42:24 -0600217
George Keishinge0a81282018-06-08 10:02:30 -0500218 # Get BMC version from BMC CLI i.e. 2.2 from "v2.2-253-g00050f1"
George Keishing3511a3f2018-04-19 10:38:30 -0500219 ${bmc_version_full}= Get BMC Version
Rahul Maheshwaribb9e2572018-04-02 05:24:37 -0500220 ${bmc_version}=
George Keishing3511a3f2018-04-19 10:38:30 -0500221 ... Remove String Using Regexp ${bmc_version_full} ^[^0-9]+ [^0-9\.].*
Rahul Maheshwaribb9e2572018-04-02 05:24:37 -0500222
223 # Get major and minor version from BMC version i.e. 2 and 1 from 2.1
George Keishingc95e9982019-01-14 09:27:45 -0600224 @{major_minor_version}= Split String ${bmc_version} .
Rahul Maheshwaribb9e2572018-04-02 05:24:37 -0500225
George Keishingc95e9982019-01-14 09:27:45 -0600226 Should Be Equal As Strings ${ipmi_fw_major_version} ${major_minor_version[0]}
George Keishing2ee2f002019-02-16 09:36:02 -0600227 ... msg=Major version mismatch.
George Keishingc95e9982019-01-14 09:27:45 -0600228 Should Be Equal As Strings ${ipmi_fw_minor_version} ${major_minor_version[1]}
George Keishing2ee2f002019-02-16 09:36:02 -0600229 ... msg=Minor version mismatch.
Rahul Maheshwaribb9e2572018-04-02 05:24:37 -0500230
Tony Lee9bca44b2019-12-13 09:34:26 +0800231 Valid Value mc_info['ipmi_version'] ['2.0']
Rahul Maheshwarife8639b2018-02-05 22:42:24 -0600232
Tony Lee9bca44b2019-12-13 09:34:26 +0800233 Valid Value ${mc_info['manufacturer_id']} [${device_id_config['manuf_id']}]
234 ${product_id_hex} = Convert To Hex ${device_id_config['prod_id']} lowercase=True
235 Valid Value mc_info['product_id'] ['${device_id_config['prod_id']} (0x${product_id_hex})']
Rahul Maheshwarife8639b2018-02-05 22:42:24 -0600236
Tony Lee9bca44b2019-12-13 09:34:26 +0800237 Valid Value mc_info['device_available'] ['yes']
238 Valid Value mc_info['provides_device_sdrs'] ['yes']
Rahul Maheshwarife8639b2018-02-05 22:42:24 -0600239 Should Contain ${mc_info['additional_device_support']} Sensor Device
240 Should Contain ${mc_info['additional_device_support']} SEL Device
241 Should Contain
242 ... ${mc_info['additional_device_support']} FRU Inventory Device
243 Should Contain ${mc_info['additional_device_support']} Chassis Device
George Keishingb746d3f2018-04-19 10:53:10 -0500244
George Keishing3511a3f2018-04-19 10:38:30 -0500245 # Auxiliary revision data verification.
246 ${aux_version}= Get Aux Version ${bmc_version_full}
247
248 # From aux_firmware_rev_info field ['0x04', '0x38', '0x00', '0x03']
249 ${bmc_aux_version}= Catenate
250 ... SEPARATOR=
251 ... ${mc_info['aux_firmware_rev_info'][0][2:]}
252 ... ${mc_info['aux_firmware_rev_info'][1][2:]}
253 ... ${mc_info['aux_firmware_rev_info'][2][2:]}
254 ... ${mc_info['aux_firmware_rev_info'][3][2:]}
255
256 Should Be Equal As Integers
257 ... ${bmc_aux_version} ${aux_version}
258 ... msg=BMC aux version ${bmc_aux_version} does not match expected value of ${aux_version}.
Rahul Maheshwarife8639b2018-02-05 22:42:24 -0600259
260
George Keishinge85113a2019-06-07 08:21:51 -0500261Test IPMI Restriction Mode
262 [Documentation] Set restricition mode via REST and verify IPMI operation.
263 [Tags] Test_IPMI_Restriction_Mode
264 # Forego normal test setup:
265 [Setup] No Operation
266 [Teardown] Run Keywords FFDC On Test Case Fail AND
267 ... Set IPMI Restriction Mode xyz.openbmc_project.Control.Security.RestrictionMode.Modes.None
268
269 # By default no IPMI operations are restricted.
270 # /xyz/openbmc_project/control/host0/restriction_mode/attr/RestrictionMode
271 # {
272 # "data": "xyz.openbmc_project.Control.Security.RestrictionMode.Modes.None",
273 # "message": "200 OK",
274 # "status": "ok"
275 # }
276
277 # Refer to: #openbmc/phosphor-host-ipmid/blob/master/host-ipmid-whitelist.conf
278 # Set the restriction mode to Whitelist IPMI commands only:
279 # /xyz/openbmc_project/control/host0/restriction_mode/attr/RestrictionMode
280 # {
281 # "data": "xyz.openbmc_project.Control.Security.RestrictionMode.Modes.Whitelist",
282 # "message": "200 OK",
283 # "status": "ok"
284 # }
285
286 Set IPMI Restriction Mode xyz.openbmc_project.Control.Security.RestrictionMode.Modes.Whitelist
287
288 # Attempt white-listed operation expecting success.
289 IPMI Power On
290
291 # Attempt non white-listed operation expecting failure.
292 Run Keyword And Expect Error *Insufficient privilege level*
Rahul Maheshwari40193982019-10-11 00:55:08 -0500293 ... Run Inband IPMI Standard Command lan set 1 access on
George Keishinge85113a2019-06-07 08:21:51 -0500294
295
Rahul Maheshwarifdd5ff62017-08-01 04:15:03 -0500296*** Keywords ***
Sweta Potthuri5c6c72e2018-01-23 05:48:35 -0600297
Sweta Potthuri7d3af3c2018-01-29 03:07:07 -0600298Set Watchdog Enabled Using REST
299 [Documentation] Set watchdog Enabled field using REST.
300 [Arguments] ${value}
301
302 # Description of argument(s):
303 # value Integer value (eg. "0-Disabled", "1-Enabled").
304
305 ${value_dict}= Create Dictionary data=${value}
Steven Sombaraaaab222018-12-19 13:16:23 -0600306 ${resp}= OpenBMC Put Request ${HOST_WATCHDOG_URI}attr/Enabled
Sweta Potthuri7d3af3c2018-01-29 03:07:07 -0600307 ... data=${value_dict}
Sweta Potthurif39022d2018-02-06 03:40:07 -0600308
309
Sweta Potthurif39022d2018-02-06 03:40:07 -0600310Fetch Details From LAN Print
311 [Documentation] Fetch details from LAN print.
312 [Arguments] ${field_name}
313
314 # Description of argument(s):
315 # ${field_name} Field name to be fetched from LAN print
316 # (e.g. "MAC Address", "Source").
317
Rahul Maheshwarid8037d32018-12-17 00:59:57 -0600318 ${stdout}= Run IPMI Standard Command lan print
Sweta Potthurif39022d2018-02-06 03:40:07 -0600319 ${fetch_value}= Get Lines Containing String ${stdout} ${field_name}
320 ${value_fetch}= Fetch From Right ${fetch_value} :${SPACE}
321 [Return] ${value_fetch}
322
Sweta Potthuri78dd1e12018-02-21 00:03:33 -0600323
324Verify Power Reading
325 [Documentation] Get dcmi power reading via IPMI.
326
327 # Example of power reading command output via IPMI.
328 # Instantaneous power reading: 235 Watts
329 # Minimum during sampling period: 235 Watts
330 # Maximum during sampling period: 235 Watts
331 # Average power reading over sample period: 235 Watts
332 # IPMI timestamp: Thu Jan 1 00:00:00 1970
333 # Sampling period: 00000000 Seconds.
334 # Power reading state is: deactivated
335
336 ${power_reading}= Get IPMI Power Reading
337
338 ${host_state}= Get Host State
339 Run Keyword If '${host_state}' == 'Off'
George Keishing51314872018-03-31 13:24:35 -0500340 ... Should Be Equal ${power_reading['instantaneous_power_reading']} 0
341 ... msg=Power reading not zero when power is off.
Sweta Potthuri78dd1e12018-02-21 00:03:33 -0600342
George Keishing51314872018-03-31 13:24:35 -0500343 Run Keyword If '${power_reading['instantaneous_power_reading']}' != '0'
Sweta Potthuri78dd1e12018-02-21 00:03:33 -0600344 ... Verify Power Reading Using REST ${power_reading['instantaneous_power_reading']}
345
346
George Keishinge78f1fd2018-09-04 13:34:59 -0500347Verify Power Reading Via Raw Command
348 [Documentation] Get dcmi power reading via IPMI raw command.
349
350 ${ipmi_raw_output}= Run IPMI Standard Command
351 ... raw ${IPMI_RAW_CMD['power_reading']['Get'][0]}
352
353 @{raw_output_list}= Split String ${ipmi_raw_output} ${SPACE}
354
355 # On successful execution of raw IPMI power reading command, completion
356 # code does not come in output. So current power value will start from 2
357 # byte instead of 3.
358
359 ${power_reading_ipmi_raw_3_item}= Get From List ${raw_output_list} 2
360 ${power_reading_ipmi_raw_3_item}=
361 ... Convert To Integer 0x${power_reading_ipmi_raw_3_item}
362
363 ${power_reading_rest}= Read Attribute
364 ... ${SENSORS_URI}power/total_power Value
365
366 # Example of power reading via REST
367 # "CriticalAlarmHigh": 0,
368 # "CriticalAlarmLow": 0,
369 # "CriticalHigh": 3100000000,
370 # "CriticalLow": 0,
371 # "Scale": -6,
372 # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.Watts",
373 # "Value": 228000000,
374 # "WarningAlarmHigh": 0,
375 # "WarningAlarmLow": 0,
376 # "WarningHigh": 3050000000,
377 # "WarningLow": 0
378
379 # Get power value based on scale i.e. Value * (10 power Scale Value)
380 # e.g. from above case 228000000 * (10 power -6) = 228000000/1000000
381
382 ${power_reading_rest}= Evaluate ${power_reading_rest}/1000000
383 ${ipmi_rest_power_diff}=
384 ... Evaluate abs(${power_reading_rest} - ${power_reading_ipmi_raw_3_item})
385
386 Should Be True ${ipmi_rest_power_diff} <= ${allowed_power_diff}
387 ... msg=Power Reading above allowed threshold ${allowed_power_diff}.
388
389
Sweta Potthuri78dd1e12018-02-21 00:03:33 -0600390Verify Power Reading Using REST
391 [Documentation] Verify power reading using REST.
392 [Arguments] ${power_reading}
393
Gunnar Mills948e2e22018-03-23 12:54:27 -0500394 # Description of argument(s):
Sweta Potthuri78dd1e12018-02-21 00:03:33 -0600395 # power_reading IPMI Power reading
396
397 ${power_reading_rest}= Read Attribute
398 ... ${SENSORS_URI}power/total_power Value
399
400 # Example of power reading via REST
401 # "CriticalAlarmHigh": 0,
402 # "CriticalAlarmLow": 0,
403 # "CriticalHigh": 3100000000,
404 # "CriticalLow": 0,
405 # "Scale": -6,
406 # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.Watts",
407 # "Value": 228000000,
408 # "WarningAlarmHigh": 0,
409 # "WarningAlarmLow": 0,
410 # "WarningHigh": 3050000000,
411 # "WarningLow": 0
412
413 # Get power value based on scale i.e. Value * (10 power Scale Value)
414 # e.g. from above case 228000000 * (10 power -6) = 228000000/1000000
415 ${power_reading_rest}= Evaluate ${power_reading_rest}/1000000
416 ${ipmi_rest_power_diff}=
417 ... Evaluate abs(${power_reading_rest} - ${power_reading})
418
419 Should Be True ${ipmi_rest_power_diff} <= ${allowed_power_diff}
420 ... msg=Power reading above allowed threshold ${allowed_power_diff}.
George Keishing02651f02018-04-11 02:07:16 -0500421
422
George Keishinge85113a2019-06-07 08:21:51 -0500423Set IPMI Restriction Mode
424 [Documentation] Set the IPMI restriction mode.
425 [Arguments] ${restriction_mode}
426
427 # Description of argument(s):
428 # restriction_mode IPMI valid restriction modes.
429
430 ${valueDict}= Create Dictionary data=${restriction_mode}
431
432 Write Attribute ${CONTROL_HOST_URI}restriction_mode/
433 ... RestrictionMode data=${valueDict}