2 Documentation Functional test for ipv6 connection with bgp.
4 ... Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
6 ... This program and the accompanying materials are made available under the
7 ... terms of the Eclipse Public License v1.0 which accompanies this distribution,
8 ... and is available at http://www.eclipse.org/legal/epl-v10.html
10 ... This suite tests simple connection between one ibgp peer (exabgp) and Odl.
11 ... Peer is configured with ipv6, and exabgp connectes to odl via ipv6.
12 ... Exabgp sends one ipv6 unicast route, which presence is verified in
13 ... example-ipv6-topology. Tests this connection multiple times, with
14 ... different ipv6 accepted formats, e.g. (::1, 0:0:0:0:0:0:0:1, full text)
15 ... This suite also tests a combination of afi-safis on odl and exabgp.
16 ... ipv6 route injection is carried out from odl to the ibgp peer without
17 ... ipv6 family enabled on the peer device and checked for exceptions
19 Library RequestsLibrary
21 Resource ../../../libraries/BGPcliKeywords.robot
22 Resource ../../../libraries/ExaBgpLib.robot
23 Resource ../../../libraries/Genius.robot
24 Resource ../../../libraries/SetupUtils.robot
25 Resource ../../../libraries/SSHKeywords.robot
26 Resource ../../../libraries/TemplatedRequests.robot
27 Resource ../../../libraries/Utils.robot
28 Resource ../../../variables/Variables.robot
29 Resource ../../../libraries/KarafKeywords.robot
31 Suite Setup Start_Suite
32 Suite Teardown Stop_Suite
33 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
37 ${BGP_VAR_FOLDER} ${CURDIR}/../../../variables/bgpfunctional/ipv6
38 ${CONFIG_SESSION} config-session
39 ${CONTROLLER_IPV6} ::1
41 ${EXABGP_ID_2} 127.0.0.1
42 ${EXABGP_CFG} exaipv6.cfg
43 ${EXABGP_LOG} exaipv6.log
44 ${EXABGP2_CFG} exaipv4.cfg
45 ${EXABGP2_LOG} exaipv4.log
46 ${EXABGP3_CFG} exabgp_graceful_restart.cfg
47 ${EXABGP3_LOG} exabgp_graceful_restart.log
48 ${EXABGP4_CFG} exa4.cfg
49 ${EXABGP4_LOG} exa4.log
51 ${CONTROLLER_IPV4} ${ODL_SYSTEM_IP}
52 ${IPV6_IP} 2607:f0d0:1002:0011:0000:0000:0000:0002
53 ${IPV6_IP_2} 2607:f0d0:1002:11:0:0:0:2
54 ${IPV6_IP_3} 2607:f0d0:1002:11::2
55 ${IPV6_IP_GW} 2607:f0d0:1002:0011:0000:0000:0000:0001
56 ${IPV6_PREFIX_LENGTH} 64
58 ${RIB_INSTANCE} example-bgp-rib
62 Reconfigure_ODL_To_Accept_Connections
63 [Documentation] Configure BGP peer modules with initiate-connection set to false with short ipv6 address.
64 &{mapping} Create Dictionary
66 ... HOLDTIME=${HOLDTIME}
67 ... PEER_PORT=${BGP_TOOL_PORT}
69 ... BGP_RIB=${RIB_INSTANCE}
71 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
72 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
73 TemplatedRequests.Put_As_Xml_Templated
74 ... ${BGP_VAR_FOLDER}/bgp_peer
75 ... mapping=${mapping}
76 ... session=${CONFIG_SESSION}
79 [Documentation] Start exabgp with
81 ${cmd} BuiltIn.Set_Variable ${EXABGP_CFG} > ${EXABGP_LOG}
82 ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cmd} ${CONFIG_SESSION} ${EXABGP_ID}
84 Verify_Ipv6_Topology_Filled
85 [Documentation] Verifies that example-ipv6-topology is filled after starting exabgp.
87 Verify_Rib_Status_Filled
89 Delete_Bgp_Peer_Configuration
90 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
91 &{mapping} Create Dictionary
93 ... HOLDTIME=${HOLDTIME}
94 ... PEER_PORT=${BGP_TOOL_PORT}
96 ... BGP_RIB=${RIB_INSTANCE}
98 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
99 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
100 TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION}
102 Verify_Ipv6_Topology_Empty
103 [Documentation] Verifies that example-ipv6-topology is empty after deconfiguring peer for the first time.
105 Verify_Rib_Status_Empty
107 Reconfigure_ODL_To_Accept_Connections_2
108 [Documentation] Configure BGP peer modules with initiate-connection set to false with ipv6 address without "::" shortened version.
109 &{mapping} Create Dictionary
111 ... HOLDTIME=${HOLDTIME}
112 ... PEER_PORT=${BGP_TOOL_PORT}
114 ... BGP_RIB=${RIB_INSTANCE}
115 ... PASSIVE_MODE=true
116 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
117 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
118 TemplatedRequests.Put_As_Xml_Templated
119 ... ${BGP_VAR_FOLDER}/bgp_peer
120 ... mapping=${mapping}
121 ... session=${CONFIG_SESSION}
123 Verify_Ipv6_Topology_Filled_2
124 [Documentation] Verifies that example-ipv6-topology is filled after configuring the peer for the second time.
126 Verify_Rib_Status_Filled
128 Delete_Bgp_Peer_Configuration_2
129 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
130 &{mapping} Create Dictionary
132 ... HOLDTIME=${HOLDTIME}
133 ... PEER_PORT=${BGP_TOOL_PORT}
135 ... BGP_RIB=${RIB_INSTANCE}
136 ... PASSIVE_MODE=true
137 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
138 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
139 TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION}
141 Verify_Ipv6_Topology_Empty_2
142 [Documentation] Verifies that example-ipv6-topology is empty after deconfiguring peer for the second time.
144 Verify_Rib_Status_Empty
146 Reconfigure_ODL_To_Accept_Connections_3
147 [Documentation] Configure BGP peer modules with initiate-connection set to false with full text ipv6 address.
148 &{mapping} Create Dictionary
150 ... HOLDTIME=${HOLDTIME}
151 ... PEER_PORT=${BGP_TOOL_PORT}
153 ... BGP_RIB=${RIB_INSTANCE}
154 ... PASSIVE_MODE=true
155 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
156 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
157 TemplatedRequests.Put_As_Xml_Templated
158 ... ${BGP_VAR_FOLDER}/bgp_peer
159 ... mapping=${mapping}
160 ... session=${CONFIG_SESSION}
162 Verify_Ipv6_Topology_Filled_3
163 [Documentation] Verifies that example-ipv6-topology is filled after configuring the peer for the third time.
165 Verify_Rib_Status_Filled
167 Delete_Bgp_Peer_Configuration_3
168 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
169 &{mapping} Create Dictionary
171 ... HOLDTIME=${HOLDTIME}
172 ... PEER_PORT=${BGP_TOOL_PORT}
174 ... BGP_RIB=${RIB_INSTANCE}
175 ... PASSIVE_MODE=true
176 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
177 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
178 TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION}
180 Verify_Ipv6_Topology_Empty_3
181 [Documentation] Verifies that example-ipv6-topology is empty after final deconfiguration.
183 Verify_Rib_Status_Empty
186 [Documentation] Save exabgp logs as exaipv6.log, and stop exabgp with ctrl-c bash signal
187 BGPcliKeywords.Store_File_To_Workspace ${EXABGP_LOG} ${EXABGP_LOG}
188 ExaBgpLib.Stop_ExaBgp
191 [Documentation] Configures bgp application peer.
192 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
193 &{mapping} Create Dictionary
195 ... HOLDTIME=${HOLDTIME}
196 ... PEER_PORT=${BGP_TOOL_PORT}
198 ... BGP_RIB=${RIB_INSTANCE}
199 ... PASSIVE_MODE=true
200 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
201 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
202 TemplatedRequests.Put_As_Xml_Templated
203 ... ${BGP_VAR_FOLDER}/application_peer
204 ... mapping=${mapping}
205 ... session=${CONFIG_SESSION}
207 Reconfigure_ODL_To_Accept_Connections_4
208 [Documentation] Configure BGP peer modules with initiate-connection set to false with short ipv6 address.
209 &{mapping} Create Dictionary
211 ... HOLDTIME=${HOLDTIME}
212 ... PEER_PORT=${BGP_TOOL_PORT}
214 ... BGP_RIB=${RIB_INSTANCE}
215 ... PASSIVE_MODE=true
216 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
217 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
218 TemplatedRequests.Put_As_Xml_Templated
219 ... ${BGP_VAR_FOLDER}/bgp_neighbor_rib
220 ... mapping=${mapping}
221 ... session=${CONFIG_SESSION}
222 RequestsLibrary.Create Session
224 ... http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
226 ... headers=${HEADERS}
230 [Documentation] Start exabgp and Verify BGP connection
232 ${cmd} BuiltIn.Set_Variable ${EXABGP2_CFG} > ${EXABGP2_LOG}
233 ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cmd} ${CONFIG_SESSION} 127.0.0.1
236 [Documentation] Inject the Ipv6 route from controller
237 &{mapping} Create Dictionary
239 ... HOLDTIME=${HOLDTIME}
240 ... PEER_PORT=${BGP_TOOL_PORT}
242 ... BGP_RIB=${RIB_INSTANCE}
243 ... PASSIVE_MODE=true
244 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
245 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
246 TemplatedRequests.Post_As_Xml_Templated
247 ... ${BGP_VAR_FOLDER}/ipv6_route_injection
248 ... mapping=${mapping}
249 ... session=${CONFIG_SESSION}
251 Check_Ipv6_Prefix_In_Bgp_Rib_1
252 [Documentation] Check for the presence of Ipv6 Prefix in the BGP RIB
253 &{mapping} Create Dictionary
254 ... IP=${CONTROLLER_IPV4}
255 ... HOLDTIME=${HOLDTIME}
256 ... PEER_PORT=${BGP_TOOL_PORT}
258 ... BGP_RIB=${RIB_INSTANCE}
259 ... PASSIVE_MODE=true
260 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
261 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
262 BuiltIn.Wait_Until_Keyword_Succeeds
265 ... TemplatedRequests.Get_As_Json_Templated
266 ... ${BGP_VAR_FOLDER}/bgp_rib
267 ... session=${CONFIG_SESSION}
268 ... mapping=${mapping}
270 Delete_Injected_Ipv6_Routes_1
271 [Documentation] Delete the injected IPV6 routes
272 &{mapping} Create Dictionary
274 ... HOLDTIME=${HOLDTIME}
275 ... PEER_PORT=${BGP_TOOL_PORT}
277 ... BGP_RIB=${RIB_INSTANCE}
278 ... PASSIVE_MODE=true
279 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
280 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
281 TemplatedRequests.Delete_Templated
282 ... ${BGP_VAR_FOLDER}/ipv6_route_injection
283 ... mapping=${mapping}
284 ... session=${CONFIG_SESSION}
285 KarafKeywords.Fail If Exceptions Found During Test ${SUITE_NAME}.${TEST_NAME} fail=${True}
287 Delete_Bgp_Peer_Configuration_4
288 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
289 &{mapping} Create Dictionary
291 ... HOLDTIME=${HOLDTIME}
292 ... PEER_PORT=${BGP_TOOL_PORT}
294 ... BGP_RIB=${RIB_INSTANCE}
295 ... PASSIVE_MODE=true
296 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
297 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
298 TemplatedRequests.Delete_Templated
299 ... ${BGP_VAR_FOLDER}/bgp_neighbor_rib
300 ... mapping=${mapping}
301 ... session=${CONFIG_SESSION}
303 Verify_Ipv6_Topology_Empty_4
304 [Documentation] Verifies that example-ipv6-topology is empty after deconfiguring peer for the first time.
306 Verify_Rib_Status_Empty
308 Reconfigure_ODL_To_Accept_Connections_5
309 [Documentation] Configure BGP peer modules with initiate-connection set to false with short ipv6 address.
310 &{mapping} Create Dictionary
312 ... HOLDTIME=${HOLDTIME}
313 ... PEER_PORT=${BGP_TOOL_PORT}
315 ... BGP_RIB=${RIB_INSTANCE}
316 ... PASSIVE_MODE=true
317 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
318 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
319 TemplatedRequests.Put_As_Xml_Templated
320 ... ${BGP_VAR_FOLDER}/bgp_peer
321 ... mapping=${mapping}
322 ... session=${CONFIG_SESSION}
325 [Documentation] Inject the Ipv6 route from controller
326 &{mapping} Create Dictionary
328 ... HOLDTIME=${HOLDTIME}
329 ... PEER_PORT=${BGP_TOOL_PORT}
331 ... BGP_RIB=${RIB_INSTANCE}
332 ... PASSIVE_MODE=true
333 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
334 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
335 TemplatedRequests.Post_As_Xml_Templated
336 ... ${BGP_VAR_FOLDER}/ipv6_route_injection
337 ... mapping=${mapping}
338 ... session=${CONFIG_SESSION}
340 Check_Ipv6_Prefix_In_Bgp_Rib_2
341 [Documentation] Check for the presence of Ipv6 Prefix in the BGP RIB
342 &{mapping} Create Dictionary
343 ... IP=${CONTROLLER_IPV4}
344 ... HOLDTIME=${HOLDTIME}
345 ... PEER_PORT=${BGP_TOOL_PORT}
347 ... BGP_RIB=${RIB_INSTANCE}
348 ... PASSIVE_MODE=true
349 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
350 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
351 BuiltIn.Wait_Until_Keyword_Succeeds
354 ... TemplatedRequests.Get_As_Json_Templated
355 ... ${BGP_VAR_FOLDER}/bgp_rib
356 ... session=${CONFIG_SESSION}
357 ... mapping=${mapping}
359 Delete_Injected_Ipv6_Routes_2
360 [Documentation] Delete the injected IPV6 routes
361 &{mapping} Create Dictionary
363 ... HOLDTIME=${HOLDTIME}
364 ... PEER_PORT=${BGP_TOOL_PORT}
366 ... BGP_RIB=${RIB_INSTANCE}
367 ... PASSIVE_MODE=true
368 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
369 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
370 TemplatedRequests.Delete_Templated
371 ... ${BGP_VAR_FOLDER}/ipv6_route_injection
372 ... mapping=${mapping}
373 ... session=${CONFIG_SESSION}
374 KarafKeywords.Fail If Exceptions Found During Test ${SUITE_NAME}.${TEST_NAME} fail=${True}
377 [Documentation] Deletes bgp application peer.
378 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
379 &{mapping} Create Dictionary
381 ... HOLDTIME=${HOLDTIME}
382 ... PEER_PORT=${BGP_TOOL_PORT}
384 ... BGP_RIB=${RIB_INSTANCE}
385 ... PASSIVE_MODE=true
386 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
387 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
388 TemplatedRequests.Delete_Templated
389 ... ${BGP_VAR_FOLDER}/application_peer
390 ... mapping=${mapping}
391 ... session=${CONFIG_SESSION}
393 Delete_Bgp_Peer_Configuration_5
394 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
395 &{mapping} Create Dictionary
397 ... HOLDTIME=${HOLDTIME}
398 ... PEER_PORT=${BGP_TOOL_PORT}
400 ... BGP_RIB=${RIB_INSTANCE}
401 ... PASSIVE_MODE=true
402 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
403 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
404 TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION}
406 Verify_Ipv6_Topology_Empty_5
407 [Documentation] Verifies that example-ipv6-topology is empty after deconfiguring peer for the first time.
409 Verify_Rib_Status_Empty
412 [Documentation] Save exabgp logs as exaipv6.log, and stop exabgp with ctrl-c bash signal
413 BGPcliKeywords.Store_File_To_Workspace ${EXABGP2_LOG} ${EXABGP2_LOG}
414 ExaBgpLib.Stop_ExaBgp
415 ${Log_Content} OperatingSystem.Get File ${EXABGP2_LOG}
418 Reconfigure_ODL_To_Accept_Connections_6
419 [Documentation] Configure BGP peer modules with initiate-connection set to false with short ipv6 address.
420 &{mapping} Create Dictionary
422 ... HOLDTIME=${HOLDTIME}
423 ... PEER_PORT=${BGP_TOOL_PORT}
425 ... BGP_RIB=${RIB_INSTANCE}
426 ... PASSIVE_MODE=true
427 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
428 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
429 TemplatedRequests.Put_As_Xml_Templated
430 ... ${BGP_VAR_FOLDER}/graceful_restart
431 ... mapping=${mapping}
432 ... session=${CONFIG_SESSION}
435 [Documentation] Start exabgp with
437 ${cmd} BuiltIn.Set_Variable ${EXABGP3_CFG} > ${EXABGP3_LOG}
438 ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cmd} ${CONFIG_SESSION} ${EXABGP_ID}
441 [Documentation] Save exabgp logs as exabgp_graceful_restart.log, and stop exabgp with ctrl-c bash signal
442 BGPcliKeywords.Store_File_To_Workspace ${EXABGP3_LOG} ${EXABGP3_LOG}
443 ExaBgpLib.Stop_ExaBgp
445 KarafKeywords.Fail If Exceptions Found During Test ${SUITE_NAME}.${TEST_NAME} fail=${True}
448 [Documentation] Start exabgp with
450 ${cmd} BuiltIn.Set_Variable ${EXABGP3_CFG} > ${EXABGP3_LOG}
451 ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cmd} ${CONFIG_SESSION} ${EXABGP_ID}
453 Delete_Bgp_Peer_Configuration_6
454 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
455 &{mapping} Create Dictionary
457 ... HOLDTIME=${HOLDTIME}
458 ... PEER_PORT=${BGP_TOOL_PORT}
460 ... BGP_RIB=${RIB_INSTANCE}
461 ... PASSIVE_MODE=true
462 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
463 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
464 TemplatedRequests.Delete_Templated
465 ... ${BGP_VAR_FOLDER}/graceful_restart
466 ... mapping=${mapping}
467 ... session=${CONFIG_SESSION}
470 [Documentation] Save exabgp logs as exabgp_graceful_restart.log, and stop exabgp with ctrl-c bash signal
471 BGPcliKeywords.Store_File_To_Workspace ${EXABGP3_LOG} ${EXABGP3_LOG}
472 ExaBgpLib.Stop_ExaBgp
474 Reconfigure_ODL_To_Accept_Connections_7
475 [Documentation] Configure BGP peer modules with initiate-connection set to false with short ipv6 address.
477 &{mapping} Create Dictionary
479 ... HOLDTIME=${HOLDTIME}
480 ... PEER_PORT=${BGP_TOOL_PORT}
482 ... BGP_RIB=${RIB_INSTANCE}
483 ... PASSIVE_MODE=true
484 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
485 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
486 TemplatedRequests.Put_As_Xml_Templated
487 ... ${BGP_VAR_FOLDER}/bgp_peer
488 ... mapping=${mapping}
489 ... session=${CONFIG_SESSION}
492 [Documentation] Start exabgp with
494 ${cmd} BuiltIn.Set_Variable ${EXABGP4_CFG} > ${EXABGP4_LOG}
495 ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cmd} ${CONFIG_SESSION} ${EXABGP_ID}
497 Delete_Bgp_Peer_Configuration_7
498 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
500 &{mapping} Create Dictionary
502 ... HOLDTIME=${HOLDTIME}
503 ... PEER_PORT=${BGP_TOOL_PORT}
505 ... BGP_RIB=${RIB_INSTANCE}
506 ... PASSIVE_MODE=true
507 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
508 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
509 TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION}
512 [Documentation] Save exabgp logs as exabgp_graceful_restart.log, and stop exabgp with ctrl-c bash signal
514 BGPcliKeywords.Store_File_To_Workspace ${EXABGP4_LOG} ${EXABGP4_LOG}
515 ExaBgpLib.Stop_ExaBgp
520 [Documentation] Suite setup keyword.
521 SetupUtils.Setup_Utils_For_Setup_And_Teardown
522 ${conn_id} SSHLibrary.Open Connection ${ODL_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=10s
523 Builtin.Set_Suite_Variable ${conn_id}
524 SSHKeywords.Flexible_Controller_Login
525 Configure_Ipv6_Network
526 SSHKeywords.Virtual_Env_Create
527 SSHKeywords.Virtual_Env_Install_Package setuptools==44.0.0
528 SSHKeywords.Virtual_Env_Install_Package exabgp==4.2.4
529 RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH}
531 Upload_Config_Files_exabgp_ipv4
532 Upload_Config_Files_exabgp_graceful_restart
533 Upload_Config_Files_Exabgp_AS_Value_Reconfigured
536 [Documentation] Suite teardown keyword
537 SSHKeywords.Virtual_Env_Delete
538 SSHLibrary.Close_All_Connections
539 RequestsLibrary.Delete_All_Sessions
540 BuiltIn.Run Keyword And Ignore Error ExaBgpLib.Stop_ExaBgp
542 Configure_Ipv6_Network
543 [Documentation] Reconfigures basic network settings on controller
544 SSHLibrary.Execute_Command sudo ip -6 addr add ${IPV6_IP}/${IPV6_PREFIX_LENGTH} dev eth0
545 SSHLibrary.Execute_Command sudo ip -6 route add default via ${IPV6_IP_GW}
546 ${stdout} SSHLibrary.Execute_Command sudo ip -6 addr show
548 ${stdout} SSHLibrary.Execute_Command sudo ip -6 route show
551 Verify_Rib_Status_Empty
552 [Documentation] Verifies that example-ipv6-topology is empty
553 BuiltIn.Wait_Until_Keyword_Succeeds
556 ... TemplatedRequests.Get_As_Json_Templated
557 ... ${BGP_VAR_FOLDER}/ipv6_topology_empty
558 ... session=${CONFIG_SESSION}
561 Verify_Rib_Status_Filled
562 [Documentation] Verifies that example-ipv6-topology is filled with ipv6 route
563 BuiltIn.Wait_Until_Keyword_Succeeds
566 ... TemplatedRequests.Get_As_Json_Templated
567 ... ${BGP_VAR_FOLDER}/ipv6_topology_filled
568 ... session=${CONFIG_SESSION}
572 [Documentation] Uploads exabgp config files
573 SSHLibrary.Put_File ${BGP_VAR_FOLDER}/${EXABGP_CFG} .
574 @{cfgfiles} SSHLibrary.List_Files_In_Directory . *.cfg
575 FOR ${cfgfile} IN @{cfgfiles}
576 SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${IPV6_IP}/g' ${cfgfile}
577 SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${CONTROLLER_IPV6}/g' ${cfgfile}
578 SSHLibrary.Execute_Command sed -i -e 's/ROUTERID/${EXABGP_ID}/g' ${cfgfile}
579 SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
580 SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
581 ${stdout} SSHLibrary.Execute_Command cat ${cfgfile}
585 Upload_Config_Files_exabgp_ipv4
586 [Documentation] Uploads exabgp config files
587 SSHLibrary.Put_File ${BGP_VAR_FOLDER}/${EXABGP2_CFG} .
588 @{cfgfiles} SSHLibrary.List_Files_In_Directory . *ipv4.cfg
589 FOR ${cfgfile} IN @{cfgfiles}
590 SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/127.0.0.1/g' ${cfgfile}
591 SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile}
592 SSHLibrary.Execute_Command sed -i -e 's/ROUTERID/127.0.0.1/g' ${cfgfile}
593 SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
594 SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
595 ${stdout} SSHLibrary.Execute_Command cat ${cfgfile}
599 Upload_Config_Files_exabgp_graceful_restart
600 [Documentation] Uploads exabgp config files
601 SSHLibrary.Put_File ${BGP_VAR_FOLDER}/${EXABGP3_CFG} .
602 @{cfgfiles} SSHLibrary.List_Files_In_Directory . *restart.cfg
603 FOR ${cfgfile} IN @{cfgfiles}
604 SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${IPV6_IP}/g' ${cfgfile}
605 SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${CONTROLLER_IPV6}/g' ${cfgfile}
606 SSHLibrary.Execute_Command sed -i -e 's/ROUTERID/${EXABGP_ID}/g' ${cfgfile}
607 SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
608 SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
609 ${stdout} SSHLibrary.Execute_Command cat ${cfgfile}
613 Upload_Config_Files_Exabgp_AS_Value_Reconfigured
614 [Documentation] Uploads exabgp config files
615 SSHLibrary.Put_File ${BGP_VAR_FOLDER}/${EXABGP4_CFG} .
616 @{cfgfiles} SSHLibrary.List_Files_In_Directory . *exa4.cfg
617 FOR ${cfgfile} IN @{cfgfiles}
618 SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${IPV6_IP}/g' ${cfgfile}
619 SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${CONTROLLER_IPV6}/g' ${cfgfile}
620 SSHLibrary.Execute_Command sed -i -e 's/ROUTERID/${EXABGP_ID}/g' ${cfgfile}
621 SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
622 SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
623 ${stdout} SSHLibrary.Execute_Command cat ${cfgfile}