blob: c1f528739600ec9f037218b8d59a41927879b501 [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
Rahul Maheshwari615da152018-02-13 23:53:36 -06006Resource ../lib/boot_utils.robot
7Library ../../lib/ipmi_utils.py
Sweta Potthurif39022d2018-02-06 03:40:07 -06008Resource ../../lib/bmc_network_utils.robot
Rahul Maheshwariabe13af2018-02-15 22:42:08 -06009Variables ../data/ipmi_raw_cmd_table.py
Rahul Maheshwarifdd5ff62017-08-01 04:15:03 -050010
11Test Teardown FFDC On Test Case Fail
12
Rahul Maheshwariabe13af2018-02-15 22:42:08 -060013
Rahul Maheshwarifdd5ff62017-08-01 04:15:03 -050014*** Variables ***
15
Sweta Potthuri5c6c72e2018-01-23 05:48:35 -060016${new_mc_id}= HOST
Rahul Maheshwari901dcde2018-02-06 03:14:31 -060017${allowed_temp_diff}= ${1}
Rahul Maheshwari615da152018-02-13 23:53:36 -060018${allowed_power_diff}= ${10}
Sweta Potthuri5c6c72e2018-01-23 05:48:35 -060019
Rahul Maheshwarifdd5ff62017-08-01 04:15:03 -050020*** Test Cases ***
21
22Set Asset Tag With Valid String Length
23 [Documentation] Set asset tag with valid string length and verify.
24 [Tags] Set_Asset_Tag_With_Valid_String_Length
25
26 # Allowed MAX characters length for asset tag name is 63.
27 ${random_string}= Generate Random String 63
28 Run Keyword Run IPMI Standard Command dcmi set_asset_tag ${random_string}
29
30 ${asset_tag}= Run Keyword Run IPMI Standard Command dcmi asset_tag
31 Should Contain ${asset_tag} ${random_string}
32
33
34Set Asset Tag With Invalid String Length
35 [Documentation] Verify error while setting invalid asset tag via IPMI.
36 [Tags] Set_Asset_Tag_With_Invalid_String_Length
37
38 # Any string more than 63 character is invalid for asset tag.
39 ${random_string}= Generate Random String 64
40
41 ${resp}= Run Keyword And Expect Error * Run IPMI Standard Command
42 ... dcmi set_asset_tag ${random_string}
43 Should Contain ${resp} Parameter out of range ignore_case=True
44
45
46Set Asset Tag With Valid String Length Via REST
47 [Documentation] Set valid asset tag via REST and verify.
48 [Tags] Set_Asset_Tag_With_Valid_String_Length_Via_REST
49
50 ${random_string}= Generate Random String 63
51 ${args}= Create Dictionary data=${random_string}
52 Write Attribute /xyz/openbmc_project/inventory/system AssetTag
53 ... data=${args}
54
55 ${asset_tag}= Read Attribute /xyz/openbmc_project/inventory/system
56 ... AssetTag
57 Should Be Equal As Strings ${asset_tag} ${random_string}
58
Sweta Potthurif39022d2018-02-06 03:40:07 -060059
Sweta Potthuri5c6c72e2018-01-23 05:48:35 -060060Verify Get And Set Management Controller ID String
61 [Documentation] Verify get and set management controller ID string.
62 [Tags] Verify_Get_And_Set_Management_Controller_ID_String
63
64 # Get the value of the managemment controller ID string.
65 # Example:
66 # Get Management Controller Identifier String: witherspoon
67
68 ${cmd_output}= Run IPMI Standard Command dcmi get_mc_id_string
69
70 # Extract management controller ID from cmd_output.
71 ${initial_mc_id}= Fetch From Right ${cmd_output} :${SPACE}
72
73 # Set the management controller ID string to other value.
74 # Example:
75 # Set Management Controller Identifier String Command: HOST
76
77 Set Management Controller ID String ${new_mc_id}
78
79 # Get the management controller ID and verify.
80 Get Management Controller ID String And Verify ${new_mc_id}
81
82 # Set the value back to the initial value and verify.
83 Set Management Controller ID String ${initial_mc_id}
84
85 # Get the management controller ID and verify.
86 Get Management Controller ID String And Verify ${initial_mc_id}
Rahul Maheshwarifdd5ff62017-08-01 04:15:03 -050087
Sweta Potthurif39022d2018-02-06 03:40:07 -060088
Sweta Potthuri0cc60502018-01-24 00:36:17 -060089Verify Chassis Identify via IPMI
90 [Documentation] Verify "chassis identify" using IPMI command.
91 [Tags] Verify_Chassis_Identify_via_IPMI
92
93 # Set to default "chassis identify" and verify that LED blinks for 15s.
94 Run IPMI Standard Command chassis identify
95 Verify Identify LED State Blink
96
97 Sleep 15s
98 Verify Identify LED State Off
99
100 # Set "chassis identify" to 10s and verify that the LED blinks for 10s.
101 Run IPMI Standard Command chassis identify 10
102 Verify Identify LED State Blink
103
104 Sleep 10s
105 Verify Identify LED State Off
106
Sweta Potthurif39022d2018-02-06 03:40:07 -0600107
Sweta Potthuri0cc60502018-01-24 00:36:17 -0600108Verify Chassis Identify Off And Force Identify On via IPMI
109 [Documentation] Verify "chassis identify" off
110 ... and "force identify on" via IPMI.
111 [Tags] Verify_Chassis_Identify_Off_And_Force_Identify_On_via_IPMI
112
113 # Set the LED to "Force Identify On".
114 Run IPMI Standard Command chassis identify force
115 Verify Identify LED State Blink
116
117 # Set "chassis identify" to 0 and verify that the LED turns off.
118 Run IPMI Standard Command chassis identify 0
119 Verify Identify LED State Off
120
Sweta Potthurif39022d2018-02-06 03:40:07 -0600121
Sweta Potthuri7d3af3c2018-01-29 03:07:07 -0600122Test Watchdog Reset Via IPMI And Verify Using REST
123 [Documentation] Test watchdog reset via IPMI and verify using REST.
124 [Tags] Test_Watchdog_Reset_Via_IPMI_And_Verify_Using_REST
125
126 Initiate Host Boot
127
128 Set Watchdog Enabled Using REST ${1}
129
130 Watchdog Object Should Exist
131
132 # Resetting the watchdog via IPMI.
133 Run IPMI Standard Command mc watchdog reset
134
135 # Verify the watchdog is reset using REST after an interval of 1000ms.
136 Sleep 1000ms
137 ${watchdog_time_left}=
138 ... Read Attribute ${HOST_WATCHDOG_URI} TimeRemaining
139 Should Be True
140 ... ${watchdog_time_left}<${1200000} and ${watchdog_time_left}>${2000}
141 ... msg=Watchdog timer didn't reset.
142
Sweta Potthurif39022d2018-02-06 03:40:07 -0600143
Sweta Potthuri7d3af3c2018-01-29 03:07:07 -0600144Test Watchdog Off Via IPMI And Verify Using REST
145 [Documentation] Test watchdog off via IPMI and verify using REST.
146 [Tags] Test_Watchdog_Off_Via_IPMI_And_Verify_Using_REST
147
148 Initiate Host Boot
149
150 Set Watchdog Enabled Using REST ${1}
151
152 Watchdog Object Should Exist
153
154 # Turn off the watchdog via IPMI.
155 Run IPMI Standard Command mc watchdog off
156
157 # Verify the watchdog is off using REST
158 ${watchdog_state}= Read Attribute ${HOST_WATCHDOG_URI} Enabled
159 Should Be Equal ${watchdog_state} ${0}
160 ... msg=msg=Verification failed for watchdog off check.
Rahul Maheshwari901dcde2018-02-06 03:14:31 -0600161
162
163Test Ambient Temperature Via IPMI
164 [Documentation] Test ambient temperature via IPMI and verify using REST.
165 [Tags] Test_Ambient_Temperature_Via_IPMI
166
167 # Entity ID Entity Instance Temp. Readings
168 # Inlet air temperature(40h) 1 +19 C
169 # CPU temperature sensors(41h) 5 +51 C
170 # CPU temperature sensors(41h) 6 +50 C
171 # CPU temperature sensors(41h) 7 +50 C
172 # CPU temperature sensors(41h) 8 +50 C
173 # CPU temperature sensors(41h) 9 +50 C
174 # CPU temperature sensors(41h) 10 +48 C
175 # CPU temperature sensors(41h) 11 +49 C
176 # CPU temperature sensors(41h) 12 +47 C
177 # CPU temperature sensors(41h) 8 +50 C
178 # CPU temperature sensors(41h) 16 +51 C
179 # CPU temperature sensors(41h) 24 +50 C
180 # CPU temperature sensors(41h) 32 +43 C
181 # CPU temperature sensors(41h) 40 +43 C
182 # Baseboard temperature sensors(42h) 1 +35 C
183
184 ${temp_reading}= Run IPMI Standard Command dcmi get_temp_reading -N 10
185 ${ambient_temp_line}=
186 ... Get Lines Containing String ${temp_reading}
187 ... Inlet air temperature case-insensitive
188
189 ${ambient_temp_ipmi}= Fetch From Right ${ambient_temp_line} +
190 ${ambient_temp_ipmi}= Remove String ${ambient_temp_ipmi} ${SPACE}C
191
192 ${ambient_temp_rest}= Read Attribute
193 ... ${SENSORS_URI}temperature/ambient Value
194
195 # Example of ambient temperature via REST
196 # "CriticalAlarmHigh": 0,
197 # "CriticalAlarmLow": 0,
198 # "CriticalHigh": 35000,
199 # "CriticalLow": 0,
200 # "Scale": -3,
201 # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.DegreesC",
202 # "Value": 21775,
203 # "WarningAlarmHigh": 0,
204 # "WarningAlarmLow": 0,
205 # "WarningHigh": 25000,
206 # "WarningLow": 0
207
208 # Get temperature value based on scale i.e. Value * (10 power Scale Value)
209 # e.g. from above case 21775 * (10 power -3) = 21775/1000
210
211 ${ambient_temp_rest}= Evaluate ${ambient_temp_rest}/1000
212 ${ipmi_rest_temp_diff}=
213 ... Evaluate abs(${ambient_temp_rest} - ${ambient_temp_ipmi})
214
215 Should Be True ${ipmi_rest_temp_diff} <= ${allowed_temp_diff}
216 ... msg=Ambient temperature above allowed threshold ${allowed_temp_diff}.
217
218
Rahul Maheshwari43556632018-02-05 23:42:52 -0600219Verify Get DCMI Capabilities
220 [Documentation] Verify get DCMI capabilities command output.
221 [Tags] Verify_Get_DCMI_Capabilities
222
223 ${cmd_output}= Run IPMI Standard Command dcmi discover
224
225 @{supported_capabilities}= Create List
226 # Supported DCMI capabilities:
227 ... Mandatory platform capabilties
228 ... Optional platform capabilties
229 ... Power management available
230 ... Managebility access capabilties
231 ... In-band KCS channel available
232 # Mandatory platform attributes:
233 ... 200 SEL entries
234 ... SEL automatic rollover is enabled
235 # Optional Platform Attributes:
236 ... Slave address of device: 0h (8bits)(Satellite/External controller)
237 ... Channel number is 0h (Primary BMC)
238 ... Device revision is 0
239 # Manageability Access Attributes:
240 ... Primary LAN channel number: 1 is available
241 ... Secondary LAN channel is not available for OOB
242 ... No serial channel is available
243
244 :FOR ${capability} IN @{supported_capabilities}
245 \ Should Contain ${cmd_output} ${capability} ignore_case=True
246 ... msg=Supported DCMI capabilities not present.
247
248
Rahul Maheshwari615da152018-02-13 23:53:36 -0600249Test Power Reading Via IPMI With Host Booted
250 [Documentation] Test power reading via IPMI with host booted state and
251 ... verify using REST.
252 [Tags] Test_Power_Reading_Via_IPMI_With_Host_Booted
253
254 REST Power On stack_mode=skip quiet=1
255
256 # Example of power reading command output via IPMI.
257 # Instantaneous power reading: 235 Watts
258 # Minimum during sampling period: 235 Watts
259 # Maximum during sampling period: 235 Watts
260 # Average power reading over sample period: 235 Watts
261 # IPMI timestamp: Thu Jan 1 00:00:00 1970
262 # Sampling period: 00000000 Seconds.
263 # Power reading state is: deactivated
264
265 ${power_reading}= Get IPMI Power Reading
266 ${power_reading_ipmi}= Set Variable
267 ... ${power_reading['instantaneous_power_reading']}
268 ${power_reading_ipmi}= Remove String ${power_reading_ipmi} ${SPACE}Watts
269
270 ${power_reading_rest}= Read Attribute
271 ... ${SENSORS_URI}power/total_power Value
272
273 # Example of power reading via REST
274 # "CriticalAlarmHigh": 0,
275 # "CriticalAlarmLow": 0,
276 # "CriticalHigh": 3100000000,
277 # "CriticalLow": 0,
278 # "Scale": -6,
279 # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.Watts",
280 # "Value": 228000000,
281 # "WarningAlarmHigh": 0,
282 # "WarningAlarmLow": 0,
283 # "WarningHigh": 3050000000,
284 # "WarningLow": 0
285
286 # Get power value based on scale i.e. Value * (10 power Scale Value)
287 # e.g. from above case 228000000 * (10 power -6) = 228000000/1000000
288
289 ${power_reading_rest}= Evaluate ${power_reading_rest}/1000000
290 ${ipmi_rest_power_diff}=
291 ... Evaluate abs(${power_reading_rest} - ${power_reading_ipmi})
292
293 Should Be True ${ipmi_rest_power_diff} <= ${allowed_power_diff}
294 ... msg=Power reading above allowed threshold ${allowed_power_diff}.
295
296
Rahul Maheshwariabe13af2018-02-15 22:42:08 -0600297Test Power Reading Via IPMI Raw Command
298 [Documentation] Test power reading via IPMI raw command and verify
299 ... using REST.
300 [Tags] Test_Power_Reading_Via_IPMI_Raw_Command
301
302 # Response data structure of power reading command output via IPMI.
303 # 1 Completion Code. Refer to section 8, DCMI Completion Codes.
304 # 2 Group Extension Identification = DCh
305 # 3:4 Current Power in watts
306
307 ${ipmi_raw_output}= Run IPMI Standard Command
308 ... raw ${IPMI_RAW_CMD['power_reading']['Get'][0]}
309
310 @{raw_output_list}= Split String ${ipmi_raw_output} ${SPACE}
311
312 # On successful execution of raw IPMI power reading command, completion
313 # code does not come in output. So current power value will start from 2
314 # byte instead of 3.
315
316 ${power_reading_ipmi_raw_3_item}= Get From List ${raw_output_list} 2
317 ${power_reading_ipmi_raw_3_item}=
318 ... Convert To Integer 0x${power_reading_ipmi_raw_3_item}
319
320 ${power_reading_rest}= Read Attribute
321 ... ${SENSORS_URI}power/total_power Value
322
323 # Example of power reading via REST
324 # "CriticalAlarmHigh": 0,
325 # "CriticalAlarmLow": 0,
326 # "CriticalHigh": 3100000000,
327 # "CriticalLow": 0,
328 # "Scale": -6,
329 # "Unit": "xyz.openbmc_project.Sensor.Value.Unit.Watts",
330 # "Value": 228000000,
331 # "WarningAlarmHigh": 0,
332 # "WarningAlarmLow": 0,
333 # "WarningHigh": 3050000000,
334 # "WarningLow": 0
335
336 # Get power value based on scale i.e. Value * (10 power Scale Value)
337 # e.g. from above case 228000000 * (10 power -6) = 228000000/1000000
338
339 ${power_reading_rest}= Evaluate ${power_reading_rest}/1000000
340 ${ipmi_rest_power_diff}=
341 ... Evaluate abs(${power_reading_rest} - ${power_reading_ipmi_raw_3_item})
342
343 Should Be True ${ipmi_rest_power_diff} <= ${allowed_power_diff}
344 ... msg=Power Reading above allowed threshold ${allowed_power_diff}.
345
346
Rahul Maheshwari91a18ef2018-02-15 04:54:59 -0600347Test Baseboard Temperature Via IPMI
348 [Documentation] Test baseboard temperature via IPMI and verify using REST.
349 [Tags] Test_Baseboard_Temperature_Via_IPMI
350
351 # Example of IPMI dcmi get_temp_reading output:
352 # Entity ID Entity Instance Temp. Readings
353 # Inlet air temperature(40h) 1 +19 C
354 # CPU temperature sensors(41h) 5 +51 C
355 # CPU temperature sensors(41h) 6 +50 C
356 # CPU temperature sensors(41h) 7 +50 C
357 # CPU temperature sensors(41h) 8 +50 C
358 # CPU temperature sensors(41h) 9 +50 C
359 # CPU temperature sensors(41h) 10 +48 C
360 # CPU temperature sensors(41h) 11 +49 C
361 # CPU temperature sensors(41h) 12 +47 C
362 # CPU temperature sensors(41h) 8 +50 C
363 # CPU temperature sensors(41h) 16 +51 C
364 # CPU temperature sensors(41h) 24 +50 C
365 # CPU temperature sensors(41h) 32 +43 C
366 # CPU temperature sensors(41h) 40 +43 C
367 # Baseboard temperature sensors(42h) 1 +35 C
368
369 ${temp_reading}= Run IPMI Standard Command dcmi get_temp_reading -N 10
370 ${baseboard_temp_line}=
371 ... Get Lines Containing String ${temp_reading}
372 ... Baseboard temperature case-insensitive=True
373
374 ${baseboard_temp_ipmi}= Fetch From Right ${baseboard_temp_line} +
375 ${baseboard_temp_ipmi}= Remove String ${baseboard_temp_ipmi} ${SPACE}C
376
377 ${baseboard_temp_rest}= Read Attribute
378 ... /xyz/openbmc_project/sensors/temperature/pcie Value
379 ${baseboard_temp_rest}= Evaluate ${baseboard_temp_rest}/1000
380
381 Should Be True
382 ... ${baseboard_temp_rest} - ${baseboard_temp_ipmi} <= ${allowed_temp_diff}
383 ... msg=Baseboard temperature above allowed threshold ${allowed_temp_diff}.
384
385
Sweta Potthurif39022d2018-02-06 03:40:07 -0600386Retrieve Default Gateway Via IPMI And Verify Using REST
387 [Documentation] Retrieve default gateway from LAN print using IPMI.
388 [Tags] Retrieve_Default_Gateway_Via_IPMI_And_Verify_Using_REST
389
390 # Fetch "Default Gateway" from IPMI LAN print.
391 ${default_gateway_ipmi}= Fetch Details From LAN Print Default Gateway IP
392
393 # Verify "Default Gateway" using REST.
394 Read Attribute ${NETWORK_MANAGER}/config DefaultGateway
395 ... expected_value=${default_gateway_ipmi}
396
397
398Retrieve MAC Address Via IPMI And Verify Using REST
399 [Documentation] Retrieve MAC Address from LAN print using IPMI.
400 [Tags] Retrieve_MAC_Address_Via_IPMI_And_Verify_Using_REST
401
402 # Fetch "MAC Address" from IPMI LAN print.
403 ${mac_address_ipmi}= Fetch Details From LAN Print MAC Address
404
405 # Verify "MAC Address" using REST.
406 ${mac_address_rest}= Get BMC MAC Address
407 Should Be Equal ${mac_address_ipmi} ${mac_address_rest}
408 ... msg=Verification of MAC address from lan print using IPMI failed.
409
410
411Retrieve Network Mode Via IPMI And Verify Using REST
412 [Documentation] Retrieve network mode from LAN print using IPMI.
413 [Tags] Retrieve_Network_Mode_Via_IPMI_And_Verify_Using_REST
414
415 # Fetch "Mode" from IPMI LAN print.
416 ${network_mode_ipmi}= Fetch Details From LAN Print Source
417
418 # Verify "Mode" using REST.
419 ${network_mode_rest}= Read Attribute
420 ... ${NETWORK_MANAGER}/eth0 DHCPEnabled
421 Run Keyword If '${network_mode_ipmi}' == 'Static Address'
422 ... Should Be Equal ${network_mode_rest} ${0}
423 ... msg=Verification of network setting failed.
424 ... ELSE IF '${network_mode_ipmi}' == 'DHCP'
425 ... Should Be Equal ${network_mode_rest} ${1}
426 ... msg=Verification of network setting failed.
427
428
429Retrieve IP Address Via IPMI And Verify With BMC Details
430 [Documentation] Retrieve IP address from LAN print using IPMI.
431 [Tags] Retrieve_IP_Address_Via_IPMI_And_Verify_With_BMC_Details
432
433 # Fetch "IP Address" from IPMI LAN print.
434 ${ip_addr_ipmi}= Fetch Details From LAN Print IP Address
435
436 # Verify the IP address retrieved via IPMI with BMC IPs.
437 ${ip_address_rest}= Get BMC IP Info
438 Validate IP On BMC ${ip_addr_ipmi} ${ip_address_rest}
439
440
Rahul Maheshwarife8639b2018-02-05 22:42:24 -0600441Verify Get Device ID
442 [Documentation] Verify get device ID command output.
443 [Tags] Verify_Get_Device_ID
444
445 # Example of get device ID command output:
446 # Device ID : 0
447 # Device Revision : 0
448 # Firmware Revision : 2.01
449 # IPMI Version : 2.0
450 # Manufacturer ID : 42817
451 # Manufacturer Name : Unknown (0xA741)
452 # Product ID : 16975 (0x424f)
453 # Product Name : Unknown (0x424F)
454 # Device Available : yes
455 # Provides Device SDRs : yes
456 # Additional Device Support :
457 # Sensor Device
458 # SEL Device
459 # FRU Inventory Device
460 # Chassis Device
461 # Aux Firmware Rev Info :
462 # 0x00
463 # 0x00
464 # 0x00
465 # 0x00
466
467 ${mc_info}= Get MC Info
468
469 Should Be Equal ${mc_info['device_id']} 0
470 Should Be Equal ${mc_info['device_revision']} 0
471
472 # Get major BMC version from BMC cli i.e. 2.1 from "v2.1-51-g04ff12c"
473 ${bmc_version}= Get BMC Version
474 ${bmc_version}= Fetch From Left ${bmc_version} -
475 ${bmc_version}= Remove String ${bmc_version} "v
476
477 Should Be Equal ${mc_info['firmware_revision']} ${bmc_version}
478 Should Be Equal ${mc_info['ipmi_version']} 2.0
479
480 # TODO: Verify Manufacturer and Product IDs directy from json file.
481 # Reference : openbmc/openbmc-test-automation#1244
482 Should Be Equal ${mc_info['manufacturer_id']} 42817
483 Should Be Equal ${mc_info['product_id']} 16975 (0x424f)
484
485 Should Be Equal ${mc_info['device_available']} yes
486 Should Be Equal ${mc_info['provides_device_sdrs']} yes
487 Should Contain ${mc_info['additional_device_support']} Sensor Device
488 Should Contain ${mc_info['additional_device_support']} SEL Device
489 Should Contain
490 ... ${mc_info['additional_device_support']} FRU Inventory Device
491 Should Contain ${mc_info['additional_device_support']} Chassis Device
492 Should Contain X Times ${mc_info['aux_firmware_rev_info']} 0x00 4
493
494
Rahul Maheshwarifdd5ff62017-08-01 04:15:03 -0500495*** Keywords ***
Sweta Potthuri5c6c72e2018-01-23 05:48:35 -0600496
Sweta Potthurif39022d2018-02-06 03:40:07 -0600497
Sweta Potthuri5c6c72e2018-01-23 05:48:35 -0600498Set Management Controller ID String
499 [Documentation] Set the management controller ID string.
500 [Arguments] ${string}
501
502 # Description of argument(s):
503 # string Management Controller ID String to be set
504
505 ${set_mc_id_string}= Run IPMI Standard Command
506 ... dcmi set_mc_id_string ${string}
507
Sweta Potthurif39022d2018-02-06 03:40:07 -0600508
Sweta Potthuri5c6c72e2018-01-23 05:48:35 -0600509Get Management Controller ID String And Verify
510 [Documentation] Get the management controller ID sting.
511 [Arguments] ${string}
512
513 # Description of argument(s):
514 # string Management Controller ID string
515
516 ${get_mc_id}= Run IPMI Standard Command dcmi get_mc_id_string
517 Should Contain ${get_mc_id} ${string}
518 ... msg=Command failed: get_mc_id.
Sweta Potthuri0cc60502018-01-24 00:36:17 -0600519
Sweta Potthurif39022d2018-02-06 03:40:07 -0600520
Sweta Potthuri0cc60502018-01-24 00:36:17 -0600521Verify Identify LED State
522 [Documentation] Verify the identify LED state
523 ... matches caller's expectations.
524 [Arguments] ${expected_state}
525
526 # Description of argument(s):
527 # expected_state The LED state expected by the caller ("Blink" or "Off").
528
529 ${resp}= Read Attribute ${LED_PHYSICAL_URI}/front_id State
530 Should Be Equal ${resp} xyz.openbmc_project.Led.Physical.Action.${expected_state}
531 ... msg=Unexpected LED state.
532
533 ${resp}= Read Attribute ${LED_PHYSICAL_URI}/rear_id State
534 Should Be Equal ${resp} xyz.openbmc_project.Led.Physical.Action.${expected_state}
535 ... msg=Unexpected LED state.
536
Sweta Potthurif39022d2018-02-06 03:40:07 -0600537
Sweta Potthuri7d3af3c2018-01-29 03:07:07 -0600538Set Watchdog Enabled Using REST
539 [Documentation] Set watchdog Enabled field using REST.
540 [Arguments] ${value}
541
542 # Description of argument(s):
543 # value Integer value (eg. "0-Disabled", "1-Enabled").
544
545 ${value_dict}= Create Dictionary data=${value}
546 ${resp}= OpenBMC Put Request ${HOST_WATCHDOG_URI}/attr/Enabled
547 ... data=${value_dict}
Sweta Potthurif39022d2018-02-06 03:40:07 -0600548
549
Sweta Potthurif39022d2018-02-06 03:40:07 -0600550Fetch Details From LAN Print
551 [Documentation] Fetch details from LAN print.
552 [Arguments] ${field_name}
553
554 # Description of argument(s):
555 # ${field_name} Field name to be fetched from LAN print
556 # (e.g. "MAC Address", "Source").
557
Sweta Potthuric64322a2018-02-22 05:30:30 -0600558 ${stdout}= Run External IPMI Standard Command lan print
Sweta Potthurif39022d2018-02-06 03:40:07 -0600559 ${fetch_value}= Get Lines Containing String ${stdout} ${field_name}
560 ${value_fetch}= Fetch From Right ${fetch_value} :${SPACE}
561 [Return] ${value_fetch}
562