blob: ce2d0a0d88a26ea1df75df94483c130fd70c3036 [file] [log] [blame]
Prashanth Katti8abbb4d2021-01-29 02:17:45 -06001*** Settings ***
2Documentation Network interface IPv6 configuration and verification
3 ... tests.
4
5Resource ../../lib/bmc_redfish_resource.robot
6Resource ../../lib/openbmc_ffdc.robot
7Resource ../../lib/bmc_ipv6_utils.robot
Sweta Potthuri8ba74322025-03-19 12:29:06 -05008Resource ../../lib/external_intf/vmi_utils.robot
Prashanth Katti8abbb4d2021-01-29 02:17:45 -06009Library ../../lib/bmc_network_utils.py
10Library Collections
11
12Test Setup Test Setup Execution
13Test Teardown Test Teardown Execution
Prashanth Katti3270fd02021-06-11 08:02:22 -050014Suite Setup Suite Setup Execution
Prashanth Katti8abbb4d2021-01-29 02:17:45 -060015
Matt Fischer6fb70d92023-10-24 19:06:33 -060016Test Tags BMC_IPv6
Prashanth Katti8abbb4d2021-01-29 02:17:45 -060017
18*** Variables ***
Sweta Potthuriafe858e2025-02-25 23:52:51 -060019${test_ipv6_addr} 2001:db8:3333:4444:5555:6666:7777:8888
20${test_ipv6_invalid_addr} 2001:db8:3333:4444:5555:6666:7777:JJKK
21${test_ipv6_addr1} 2001:db8:3333:4444:5555:6666:7777:9999
Prashanth Katti8abbb4d2021-01-29 02:17:45 -060022
George Keishinge16f1582022-12-15 07:32:21 -060023# Valid prefix length is a integer ranges from 1 to 128.
Sweta Potthuriafe858e2025-02-25 23:52:51 -060024${test_prefix_length} 64
Prashanth Katti8abbb4d2021-01-29 02:17:45 -060025
26*** Test Cases ***
27
28Get IPv6 Address And Verify
29 [Documentation] Get IPv6 Address And Verify.
30 [Tags] Get_IPv6_Address_And_Verify
31
32 FOR ${ipv6_network_configuration} IN @{ipv6_network_configurations}
33 Verify IPv6 On BMC ${ipv6_network_configuration['Address']}
34 END
35
36
Prashanth Katti2c73abc2021-03-17 07:42:25 -050037Get PrefixLength And Verify
38 [Documentation] Get IPv6 prefix length and verify.
39 [Tags] Get_PrefixLength_And_Verify
40
41 FOR ${ipv6_network_configuration} IN @{ipv6_network_configurations}
42 Verify IPv6 On BMC ${ipv6_network_configuration['PrefixLength']}
43 END
44
45
46Get IPv6 Default Gateway And Verify
George Keishing96143832021-03-23 07:55:08 -050047 [Documentation] Get IPv6 default gateway and verify.
George Keishingade6ab42022-07-19 11:41:03 -050048 [Tags] Get_IPv6_Default_Gateway_And_Verify
Prashanth Katti2c73abc2021-03-17 07:42:25 -050049
50 ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
51 ${ipv6_gateway}= Get From Dictionary ${resp.dict} IPv6DefaultGateway
52 Verify IPv6 Default Gateway On BMC ${ipv6_gateway}
53
54
Prashanth Kattic1d2daa2022-07-26 03:53:06 -050055Verify All Configured IPv6 And PrefixLength On BMC
56 [Documentation] Verify IPv6 address and its prefix length on BMC.
57 [Tags] Verify_All_Configured_IPv6_And_PrefixLength_On_BMC
58
59 FOR ${ipv6_network_configuration} IN @{ipv6_network_configurations}
George Keishingf02ca2b2023-04-05 22:11:03 +053060 Verify IPv6 And PrefixLength ${ipv6_network_configuration['Address']}
Prashanth Kattic1d2daa2022-07-26 03:53:06 -050061 ... ${ipv6_network_configuration['PrefixLength']}
62 END
63
64
65Configure IPv6 Address And Verify
66 [Documentation] Configure IPv6 address and verify.
67 [Tags] Configure_IPv6_Address_And_Verify
68 [Template] Configure IPv6 Address On BMC
69
70
71 # IPv6 address Prefix length
72 ${test_ipv6_addr} ${test_prefix_length}
73
74
Prashanth Katti12ed4b72023-05-16 05:24:00 -050075Delete IPv6 Address And Verify
76 [Documentation] Delete IPv6 address and verify.
77 [Tags] Delete_IPv6_Address_And_Verify
78
79 Configure IPv6 Address On BMC ${test_ipv6_addr} ${test_prefix_length}
80
81 Delete IPv6 Address ${test_ipv6_addr}
82
83
Prashanth Katti5f7d2e42023-05-22 03:17:25 -050084
George Keishingcc288312024-10-22 10:13:12 +053085Modify IPv6 Address And Verify
Prashanth Katti5f7d2e42023-05-22 03:17:25 -050086 [Documentation] Modify IPv6 address and verify.
87 [Tags] Modify_IPv6_Address_And_Verify
kvishal88de8c42025-03-04 01:45:10 -060088 [Teardown] Run Keywords
George Keishingcfdd0992025-03-17 11:59:20 +053089 ... Delete IPv6 Address ${test_ipv6_addr1} AND Test Teardown Execution
Prashanth Katti5f7d2e42023-05-22 03:17:25 -050090
91 Configure IPv6 Address On BMC ${test_ipv6_addr} ${test_prefix_length}
92
93 Modify IPv6 Address ${test_ipv6_addr} ${test_ipv6_addr1} ${test_prefix_length}
94
95
Sweta Potthuriafe858e2025-02-25 23:52:51 -060096Verify Persistency Of IPv6 After BMC Reboot
97 [Documentation] Verify persistency of IPv6 after BMC reboot.
98 [Tags] Verify_Persistency_Of_IPv6_After_BMC_Reboot
99 [Teardown] Run Keywords
100 ... Delete IPv6 Address ${test_ipv6_addr} AND Test Teardown Execution
101
102 Configure IPv6 Address On BMC ${test_ipv6_addr} ${test_prefix_length}
103
104 Redfish OBMC Reboot (off) stack_mode=skip
105
106 # Verifying persistency of IPv6.
107 Verify IPv6 On BMC ${test_ipv6_addr}
108
109
Sweta Potthuri8ba74322025-03-19 12:29:06 -0500110Enable SLAACv6 On BMC And Verify
111 [Documentation] Enable SLAACv6 on BMC and verify.
112 [Tags] Enable_SLAACv6_On_BMC_And_Verify
113
114 Set SLAACv6 Configuration State And Verify ${True}
115
116
Sweta Potthuri0df4a862025-03-24 12:05:09 -0500117Enable DHCPv6 Property On BMC And Verify
118 [Documentation] Enable DHCPv6 property on BMC and verify.
119 [Tags] Enable_DHCPv6_Property_On_BMC_And_Verify
120
121 Set And Verify DHCPv6 Property Enabled
122
123
Prashanth Katti8abbb4d2021-01-29 02:17:45 -0600124*** Keywords ***
125
Prashanth Katti3270fd02021-06-11 08:02:22 -0500126Suite Setup Execution
127 [Documentation] Do suite setup execution.
128
129 ${active_channel_config}= Get Active Channel Config
130 ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
131
132 Set Suite variable ${ethernet_interface}
133
134
Prashanth Katti8abbb4d2021-01-29 02:17:45 -0600135Test Setup Execution
136 [Documentation] Test setup execution.
137
138 Redfish.Login
139
140 @{ipv6_network_configurations}= Get IPv6 Network Configuration
141 Set Test Variable @{ipv6_network_configurations}
142
143 # Get BMC IPv6 address and prefix length.
144 ${ipv6_data}= Get BMC IPv6 Info
145 Set Test Variable ${ipv6_data}
146
147
148Test Teardown Execution
149 [Documentation] Test teardown execution.
150
151 FFDC On Test Case Fail
152 Redfish.Logout
153
154
155Get IPv6 Network Configuration
156 [Documentation] Get Ipv6 network configuration.
157 # Sample output:
158 # {
ganesanb4d430282023-04-27 14:33:23 +0000159 # "@odata.id": "/redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces/eth0",
Prashanth Katti8abbb4d2021-01-29 02:17:45 -0600160 # "@odata.type": "#EthernetInterface.v1_4_1.EthernetInterface",
161 # "DHCPv4": {
162 # "DHCPEnabled": false,
163 # "UseDNSServers": false,
164 # "UseDomainName": true,
165 # "UseNTPServers": false
166 # },
167 # "DHCPv6": {
168 # "OperatingMode": "Disabled",
169 # "UseDNSServers": false,
170 # "UseDomainName": true,
171 # "UseNTPServers": false
172 # },
173 # "Description": "Management Network Interface",
174 # "FQDN": "localhost",
175 # "HostName": "localhost",
176 # "IPv4Addresses": [
177 # {
178 # "Address": "xx.xx.xx.xx",
179 # "AddressOrigin": "Static",
180 # "Gateway": "xx.xx.xx.1",
181 # "SubnetMask": "xx.xx.xx.0"
182 # },
183 # {
184 # "Address": "169.254.xx.xx",
185 # "AddressOrigin": "IPv4LinkLocal",
186 # "Gateway": "0.0.0.0",
187 # "SubnetMask": "xx.xx.0.0"
188 # },
189 # ],
190 # "IPv4StaticAddresses": [
191 # {
192 # "Address": "xx.xx.xx.xx",
193 # "AddressOrigin": "Static",
194 # "Gateway": "xx.xx.xx.1",
195 # "SubnetMask": "xx.xx.0.0"
196 # }
197 # }
198 # ],
199 # "IPv6AddressPolicyTable": [],
200 # "IPv6Addresses": [
201 # {
202 # "Address": "fe80::xxxx:xxxx:xxxx:xxxx",
203 # "AddressOrigin": "LinkLocal",
204 # "AddressState": null,
205 # "PrefixLength": xx
206 # }
207 # ],
208 # "IPv6DefaultGateway": "",
209 # "IPv6StaticAddresses": [
210 # { "Address": "xxxx:xxxx:xxxx:xxxx::xxxx",
211 # "AddressOrigin": "Static",
212 # "AddressState": null,
213 # "PrefixLength": xxx
214 # }
215 # ],
216 # "Id": "eth0",
217 # "InterfaceEnabled": true,
218 # "LinkStatus": "LinkUp",
219 # "MACAddress": "xx:xx:xx:xx:xx:xx",
220 # "Name": "Manager Ethernet Interface",
221 # "NameServers": [],
222 # "SpeedMbps": 0,
223 # "StaticNameServers": [],
224 # "Status": {
225 # "Health": "OK",
226 # "HealthRollup": "OK",
227 # "State": "Enabled"
228 # },
229 # "VLANs": {
ganesanb4d430282023-04-27 14:33:23 +0000230 # "@odata.id": "/redfish/v1/Managers/${MANAGER_ID}/EthernetInterfaces/eth0/VLANs"
Prashanth Katti8abbb4d2021-01-29 02:17:45 -0600231
232
233 ${active_channel_config}= Get Active Channel Config
234 ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${active_channel_config['${CHANNEL_NUMBER}']['name']}
235
236 @{ipv6_network_configurations}= Get From Dictionary ${resp.dict} IPv6StaticAddresses
George Keishing409df052024-01-17 22:36:14 +0530237 RETURN @{ipv6_network_configurations}
Prashanth Kattic1d2daa2022-07-26 03:53:06 -0500238
239
240Verify IPv6 And PrefixLength
241 [Documentation] Verify IPv6 address and prefix length on BMC.
242 [Arguments] ${ipv6_addr} ${prefix_len}
243
244 # Description of the argument(s):
245 # ipv6_addr IPv6 address to be verified.
246 # prefix_len PrefixLength value to be verified.
247
248 # Catenate IPv6 address and its prefix length.
249 ${ipv6_with_prefix}= Catenate ${ipv6_addr}/${prefix_len}
250
251 # Get IPv6 address details on BMC using IP command.
252 @{ip_data}= Get BMC IPv6 Info
253
254 # Verify if IPv6 and prefix length is configured on BMC.
255
256 Should Contain ${ip_data} ${ipv6_with_prefix}
257 ... msg=IPv6 and prefix length pair does not exist.
258
259
260Configure IPv6 Address On BMC
261 [Documentation] Add IPv6 Address on BMC.
262 [Arguments] ${ipv6_addr} ${prefix_len} ${valid_status_codes}=${HTTP_OK}
263
264 # Description of argument(s):
265 # ipv6_addr IPv6 address to be added (e.g. "2001:EEEE:2222::2022").
266 # prefix_len Prefix length for the IPv6 to be added
267 # (e.g. "64").
268 # valid_status_codes Expected return code from patch operation
269 # (e.g. "200").
270
Prashanth Katti12ed4b72023-05-16 05:24:00 -0500271 ${prefix_length}= Convert To Integer ${prefix_len}
Prashanth Kattic1d2daa2022-07-26 03:53:06 -0500272 ${empty_dict}= Create Dictionary
273 ${ipv6_data}= Create Dictionary Address=${ipv6_addr}
Prashanth Katti12ed4b72023-05-16 05:24:00 -0500274 ... PrefixLength=${prefix_length}
Prashanth Kattic1d2daa2022-07-26 03:53:06 -0500275
276 ${patch_list}= Create List
277
278 # Get existing static IPv6 configurations on BMC.
279 ${ipv6_network_configurations}= Get IPv6 Network Configuration
280 ${num_entries}= Get Length ${ipv6_network_configurations}
281
282 FOR ${INDEX} IN RANGE 0 ${num_entries}
283 Append To List ${patch_list} ${empty_dict}
284 END
285
286 ${valid_status_codes}= Run Keyword If '${valid_status_codes}' == '${HTTP_OK}'
287 ... Set Variable ${HTTP_OK},${HTTP_NO_CONTENT}
288 ... ELSE Set Variable ${valid_status_codes}
289
290 # We need not check for existence of IPv6 on BMC while adding.
291 Append To List ${patch_list} ${ipv6_data}
292 ${data}= Create Dictionary IPv6StaticAddresses=${patch_list}
293
294 ${active_channel_config}= Get Active Channel Config
295 ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
296
297 Redfish.patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} body=&{data}
298 ... valid_status_codes=[${valid_status_codes}]
299
300 Return From Keyword If '${valid_status_codes}' != '${HTTP_OK},${HTTP_NO_CONTENT}'
301
302 # Note: Network restart takes around 15-18s after patch request processing.
303 Sleep ${NETWORK_TIMEOUT}s
304 Wait For Host To Ping ${OPENBMC_HOST} ${NETWORK_TIMEOUT}
305
306 Verify IPv6 And PrefixLength ${ipv6_addr} ${prefix_len}
307
308 # Verify if existing static IPv6 addresses still exist.
309 FOR ${ipv6_network_configuration} IN @{ipv6_network_configurations}
310 Verify IPv6 On BMC ${ipv6_network_configuration['Address']}
311 END
312
313 Validate IPv6 Network Config On BMC
314
315
316Validate IPv6 Network Config On BMC
317 [Documentation] Check that IPv6 network info obtained via redfish matches info
318 ... obtained via CLI.
Prashanth Katti5f7d2e42023-05-22 03:17:25 -0500319 @{ipv6_network_configurations}= Get IPv6 Network Configuration
Prashanth Kattic1d2daa2022-07-26 03:53:06 -0500320 ${ipv6_data}= Get BMC IPv6 Info
321 FOR ${ipv6_network_configuration} IN @{ipv6_network_configurations}
322 Should Contain Match ${ipv6_data} ${ipv6_network_configuration['Address']}/*
323 ... msg=IPv6 address does not exist.
324 END
325
Prashanth Katti12ed4b72023-05-16 05:24:00 -0500326
327Delete IPv6 Address
328 [Documentation] Delete IPv6 address of BMC.
329 [Arguments] ${ipv6_addr} ${valid_status_codes}=${HTTP_OK}
330
331 # Description of argument(s):
332 # ipv6_addr IPv6 address to be deleted (e.g. "2001:1234:1234:1234::1234").
333 # valid_status_codes Expected return code from patch operation
334 # (e.g. "200"). See prolog of rest_request
335 # method in redfish_plus.py for details.
336
337 ${empty_dict}= Create Dictionary
338 ${patch_list}= Create List
339
340 @{ipv6_network_configurations}= Get IPv6 Network Configuration
341 FOR ${ipv6_network_configuration} IN @{ipv6_network_configurations}
342 IF '${ipv6_network_configuration['Address']}' == '${ipv6_addr}'
343 Append To List ${patch_list} ${null}
344 ELSE
345 Append To List ${patch_list} ${empty_dict}
346 END
347 END
348
349 ${ip_found}= Run Keyword And Return Status List Should Contain Value
350 ... ${patch_list} ${null} msg=${ipv6_addr} does not exist on BMC
351 Pass Execution If ${ip_found} == ${False} ${ipv6_addr} does not exist on BMC
352
353 # Run patch command only if given IP is found on BMC
354 ${data}= Create Dictionary IPv6StaticAddresses=${patch_list}
355
356 ${active_channel_config}= Get Active Channel Config
357 ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
358
359 Redfish.patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface} body=&{data}
360 ... valid_status_codes=[${valid_status_codes}]
361
362 # Note: Network restart takes around 15-18s after patch request processing
363 Sleep ${NETWORK_TIMEOUT}s
364 Wait For Host To Ping ${OPENBMC_HOST} ${NETWORK_TIMEOUT}
365
366 # IPv6 address that is deleted should not be there on BMC.
367 ${delete_status}= Run Keyword And Return Status Verify IPv6 On BMC ${ipv6_addr}
368 IF '${valid_status_codes}' == '${HTTP_OK}'
369 Should Be True '${delete_status}' == '${False}'
370 ELSE
371 Should Be True '${delete_status}' == '${True}'
372 END
373
374 Validate IPv6 Network Config On BMC
Prashanth Katti5f7d2e42023-05-22 03:17:25 -0500375
376
377Modify IPv6 Address
378 [Documentation] Modify and verify IPv6 address of BMC.
379 [Arguments] ${ipv6} ${new_ipv6} ${prefix_len}
380 ... ${valid_status_codes}=[${HTTP_OK}, ${HTTP_NO_CONTENT}]
381
382 # Description of argument(s):
383 # ipv6 IPv6 address to be replaced (e.g. "2001:AABB:CCDD::AAFF").
384 # new_ipv6 New IPv6 address to be configured.
385 # prefix_len Prefix length value (Range 1 to 128).
386 # valid_status_codes Expected return code from patch operation
387 # (e.g. "200", "201").
388
389 ${empty_dict}= Create Dictionary
390 ${patch_list}= Create List
391 ${prefix_length}= Convert To Integer ${prefix_len}
392 ${ipv6_data}= Create Dictionary
393 ... Address=${new_ipv6} PrefixLength=${prefix_length}
394
395 # Sample IPv6 network configurations:
396 # "IPv6AddressPolicyTable": [],
397 # "IPv6Addresses": [
398 # {
399 # "Address": "X002:db8:0:2::XX0",
400 # "AddressOrigin": "DHCPv6",
401 # "PrefixLength": 128
402 # },
403 # {
404 # "Address": “X002:db8:0:2:a94:XXff:fe82:XXXX",
405 # "AddressOrigin": "SLAAC",
406 # "PrefixLength": 64
407 # },
408 # {
409 # "Address": “Y002:db8:0:2:a94:efff:fe82:5000",
410 # "AddressOrigin": "Static",
411 # "PrefixLength": 56
412 # },
413 # {
414 # "Address": “Z002:db8:0:2:a94:efff:fe82:5000",
415 # "AddressOrigin": "Static",
416 # "PrefixLength": 56
417 # },
418 # {
419 # "Address": “Xe80::a94:efff:YYYY:XXXX",
420 # "AddressOrigin": "LinkLocal",
421 # "PrefixLength": 64
422 # },
423 # {
424 # "Address": “X002:db8:1:2:eff:233:fee:546",
425 # "AddressOrigin": "Static",
426 # "PrefixLength": 56
427 # }
428 # ],
429 # "IPv6DefaultGateway": “XXXX::ab2e:80fe:87df:XXXX”,
430 # "IPv6StaticAddresses": [
431 # {
432 # "Address": “X002:db8:0:2:a94:efff:fe82:5000",
433 # "PrefixLength": 56
434 # },
435 # {
436 # "Address": “Y002:db8:0:2:a94:efff:fe82:5000",
437 # "PrefixLength": 56
438 # },
439 # {
440 # "Address": “Z002:db8:1:2:eff:233:fee:546",
441 # "PrefixLength": 56
442 # }
443 # ],
444 # "IPv6StaticDefaultGateways": [],
445
446 # Find the position of IPv6 address to be modified.
447 @{ipv6_network_configurations}= Get IPv6 Network Configuration
448 FOR ${ipv6_network_configuration} IN @{ipv6_network_configurations}
449 Run Keyword If '${ipv6_network_configuration['Address']}' == '${ipv6}'
450 ... Append To List ${patch_list} ${ipv6_data}
451 ... ELSE Append To List ${patch_list} ${empty_dict}
452 END
453
454 # Modify the IPv6 address only if given IPv6 is found
455 ${ip_found}= Run Keyword And Return Status List Should Contain Value
456 ... ${patch_list} ${ipv6_data} msg=${ipv6} does not exist on BMC
457 Pass Execution If ${ip_found} == ${False} ${ipv6} does not exist on BMC
458
459 ${data}= Create Dictionary IPv6StaticAddresses=${patch_list}
460
461 ${active_channel_config}= Get Active Channel Config
462 ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
463
464 Redfish.patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
465 ... body=&{data} valid_status_codes=${valid_status_codes}
466
467 # Note: Network restart takes around 15-18s after patch request processing.
468 Sleep ${NETWORK_TIMEOUT}s
469 Wait For Host To Ping ${OPENBMC_HOST} ${NETWORK_TIMEOUT}
470
471 # Verify if new IPv6 address is configured on BMC.
472 Verify IPv6 On BMC ${new_ipv6}
473
474 # Verify if old IPv6 address is erased.
475 ${cmd_status}= Run Keyword And Return Status
476 ... Verify IPv6 On BMC ${ipv6}
477 Should Be Equal ${cmd_status} ${False} msg=Old IPv6 address is not deleted.
478
479 Validate IPv6 Network Config On BMC
Sweta Potthuri8ba74322025-03-19 12:29:06 -0500480
481
482Set SLAACv6 Configuration State And Verify
483 [Documentation] Set SLAACv6 configuration state and verify.
484 [Arguments] ${slaac_state} ${valid_status_codes}=${HTTP_OK}
485
486 # Description of argument(s):
487 # slaac_state SLAACv6 state('True' or 'False').
488 # valid_status_code Expected valid status codes.
489
490 ${active_channel_config}= Get Active Channel Config
491 ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
492
493 ${data}= Set Variable If ${slaac_state} == ${False} ${DISABLE_SLAAC} ${ENABLE_SLAAC}
494 ${resp}= Redfish.Patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
495 ... body=${data} valid_status_codes=[${valid_status_codes}]
496
497 # Verify SLAACv6 is set correctly.
498 ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
499 ${slaac_verify}= Get From Dictionary ${resp.dict} StatelessAddressAutoConfig
500
501 Run Keyword If '${slaac_verify['IPv6AutoConfigEnabled']}' != '${slaac_state}'
502 ... Fail msg=SLAACv6 not set properly.
Sweta Potthuri0df4a862025-03-24 12:05:09 -0500503
504Set And Verify DHCPv6 Property
505 [Documentation] Set DHCPv6 attribute and verify.
506 [Arguments] ${dhcpv6_operating_mode}=${Disabled}
507
508 # Description of argument(s):
509 # dhcpv6_operating_mode Enabled if user wants to enable DHCPv6('Enabled' or 'Disabled').
510
511 ${data}= Set Variable If '${dhcpv6_operating_mode}' == 'Disabled' ${DISABLE_DHCPv6} ${ENABLE_DHCPv6}
512 ${active_channel_config}= Get Active Channel Config
513 ${ethernet_interface}= Set Variable ${active_channel_config['${CHANNEL_NUMBER}']['name']}
514
515 Redfish.Patch ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
516 ... body=${data} valid_status_codes=[${HTTP_OK},${HTTP_NO_CONTENT}]
517
518 ${resp}= Redfish.Get ${REDFISH_NW_ETH_IFACE}${ethernet_interface}
519 ${dhcpv6_verify}= Get From Dictionary ${resp.dict} DHCPv6
520
521 Should Be Equal '${dhcpv6_verify['OperatingMode']}' '${dhcpv6_operating_mode}'