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/SetupUtils.robot
24 Resource ../../../libraries/SSHKeywords.robot
25 Resource ../../../libraries/TemplatedRequests.robot
26 Resource ../../../libraries/Utils.robot
27 Resource ../../../variables/Variables.robot
28 Resource ../../../libraries/KarafKeywords.robot
30 Suite Setup Start_Suite
31 Suite Teardown Stop_Suite
32 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
36 ${BGP_VAR_FOLDER} ${CURDIR}/../../../variables/bgpfunctional/ipv6
37 ${CONFIG_SESSION} config-session
38 ${CONTROLLER_IPV6} ::1
40 ${EXABGP_ID_2} 127.0.0.1
41 ${EXABGP_CFG} exaipv6.cfg
42 ${EXABGP_LOG} exaipv6.log
43 ${EXABGP2_CFG} exaipv4.cfg
44 ${EXABGP2_LOG} exaipv4.log
45 ${EXABGP3_CFG} exabgp_graceful_restart.cfg
46 ${EXABGP3_LOG} exabgp_graceful_restart.log
47 ${EXABGP4_CFG} exa4.cfg
48 ${EXABGP4_LOG} exa4.log
50 ${CONTROLLER_IPV4} ${ODL_SYSTEM_IP}
51 ${IPV6_IP} 2607:f0d0:1002:0011:0000:0000:0000:0002
52 ${IPV6_IP_2} 2607:f0d0:1002:11:0:0:0:2
53 ${IPV6_IP_3} 2607:f0d0:1002:11::2
54 ${IPV6_IP_GW} 2607:f0d0:1002:0011:0000:0000:0000:0001
55 ${IPV6_PREFIX_LENGTH} 64
57 ${RIB_INSTANCE} example-bgp-rib
61 Reconfigure_ODL_To_Accept_Connections
62 [Documentation] Configure BGP peer modules with initiate-connection set to false with short ipv6 address.
63 &{mapping} Create Dictionary
65 ... HOLDTIME=${HOLDTIME}
66 ... PEER_PORT=${BGP_TOOL_PORT}
68 ... BGP_RIB=${RIB_INSTANCE}
70 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
71 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
72 TemplatedRequests.Put_As_Xml_Templated
73 ... ${BGP_VAR_FOLDER}/bgp_peer
74 ... mapping=${mapping}
75 ... session=${CONFIG_SESSION}
78 [Documentation] Start exabgp with
80 ${cmd} BuiltIn.Set_Variable ${EXABGP_CFG} > ${EXABGP_LOG}
81 ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cmd} ${CONFIG_SESSION} ${EXABGP_ID}
83 Verify_Ipv6_Topology_Filled
84 [Documentation] Verifies that example-ipv6-topology is filled after starting exabgp.
86 Verify_Rib_Status_Filled
88 Delete_Bgp_Peer_Configuration
89 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
90 &{mapping} Create Dictionary
92 ... HOLDTIME=${HOLDTIME}
93 ... PEER_PORT=${BGP_TOOL_PORT}
95 ... BGP_RIB=${RIB_INSTANCE}
97 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
98 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
99 TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION}
101 Verify_Ipv6_Topology_Empty
102 [Documentation] Verifies that example-ipv6-topology is empty after deconfiguring peer for the first time.
104 Verify_Rib_Status_Empty
106 Reconfigure_ODL_To_Accept_Connections_2
107 [Documentation] Configure BGP peer modules with initiate-connection set to false with ipv6 address without "::" shortened version.
108 &{mapping} Create Dictionary
110 ... HOLDTIME=${HOLDTIME}
111 ... PEER_PORT=${BGP_TOOL_PORT}
113 ... BGP_RIB=${RIB_INSTANCE}
114 ... PASSIVE_MODE=true
115 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
116 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
117 TemplatedRequests.Put_As_Xml_Templated
118 ... ${BGP_VAR_FOLDER}/bgp_peer
119 ... mapping=${mapping}
120 ... session=${CONFIG_SESSION}
122 Verify_Ipv6_Topology_Filled_2
123 [Documentation] Verifies that example-ipv6-topology is filled after configuring the peer for the second time.
125 Verify_Rib_Status_Filled
127 Delete_Bgp_Peer_Configuration_2
128 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
129 &{mapping} Create Dictionary
131 ... HOLDTIME=${HOLDTIME}
132 ... PEER_PORT=${BGP_TOOL_PORT}
134 ... BGP_RIB=${RIB_INSTANCE}
135 ... PASSIVE_MODE=true
136 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
137 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
138 TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION}
140 Verify_Ipv6_Topology_Empty_2
141 [Documentation] Verifies that example-ipv6-topology is empty after deconfiguring peer for the second time.
143 Verify_Rib_Status_Empty
145 Reconfigure_ODL_To_Accept_Connections_3
146 [Documentation] Configure BGP peer modules with initiate-connection set to false with full text ipv6 address.
147 &{mapping} Create Dictionary
149 ... HOLDTIME=${HOLDTIME}
150 ... PEER_PORT=${BGP_TOOL_PORT}
152 ... BGP_RIB=${RIB_INSTANCE}
153 ... PASSIVE_MODE=true
154 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
155 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
156 TemplatedRequests.Put_As_Xml_Templated
157 ... ${BGP_VAR_FOLDER}/bgp_peer
158 ... mapping=${mapping}
159 ... session=${CONFIG_SESSION}
161 Verify_Ipv6_Topology_Filled_3
162 [Documentation] Verifies that example-ipv6-topology is filled after configuring the peer for the third time.
164 Verify_Rib_Status_Filled
166 Delete_Bgp_Peer_Configuration_3
167 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
168 &{mapping} Create Dictionary
170 ... HOLDTIME=${HOLDTIME}
171 ... PEER_PORT=${BGP_TOOL_PORT}
173 ... BGP_RIB=${RIB_INSTANCE}
174 ... PASSIVE_MODE=true
175 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
176 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
177 TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION}
179 Verify_Ipv6_Topology_Empty_3
180 [Documentation] Verifies that example-ipv6-topology is empty after final deconfiguration.
182 Verify_Rib_Status_Empty
185 [Documentation] Save exabgp logs as exaipv6.log, and stop exabgp with ctrl-c bash signal
186 BGPcliKeywords.Store_File_To_Workspace ${EXABGP_LOG} ${EXABGP_LOG}
187 ExaBgpLib.Stop_ExaBgp
190 [Documentation] Configures bgp application peer.
191 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
192 &{mapping} Create Dictionary
194 ... HOLDTIME=${HOLDTIME}
195 ... PEER_PORT=${BGP_TOOL_PORT}
197 ... BGP_RIB=${RIB_INSTANCE}
198 ... PASSIVE_MODE=true
199 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
200 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
201 TemplatedRequests.Put_As_Xml_Templated
202 ... ${BGP_VAR_FOLDER}/application_peer
203 ... mapping=${mapping}
204 ... session=${CONFIG_SESSION}
206 Reconfigure_ODL_To_Accept_Connections_4
207 [Documentation] Configure BGP peer modules with initiate-connection set to false with short ipv6 address.
208 &{mapping} Create Dictionary
210 ... HOLDTIME=${HOLDTIME}
211 ... PEER_PORT=${BGP_TOOL_PORT}
213 ... BGP_RIB=${RIB_INSTANCE}
214 ... PASSIVE_MODE=true
215 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
216 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
217 TemplatedRequests.Put_As_Xml_Templated
218 ... ${BGP_VAR_FOLDER}/bgp_neighbor_rib
219 ... mapping=${mapping}
220 ... session=${CONFIG_SESSION}
221 RequestsLibrary.Create Session
223 ... http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
225 ... headers=${HEADERS}
229 [Documentation] Start exabgp and Verify BGP connection
231 ${cmd} BuiltIn.Set_Variable ${EXABGP2_CFG} > ${EXABGP2_LOG}
232 ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cmd} ${CONFIG_SESSION} 127.0.0.1
235 [Documentation] Inject the Ipv6 route from controller
236 &{mapping} Create Dictionary
238 ... HOLDTIME=${HOLDTIME}
239 ... PEER_PORT=${BGP_TOOL_PORT}
241 ... BGP_RIB=${RIB_INSTANCE}
242 ... PASSIVE_MODE=true
243 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
244 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
245 TemplatedRequests.Post_As_Xml_Templated
246 ... ${BGP_VAR_FOLDER}/ipv6_route_injection
247 ... mapping=${mapping}
248 ... session=${CONFIG_SESSION}
250 Check_Ipv6_Prefix_In_Bgp_Rib_1
251 [Documentation] Check for the presence of Ipv6 Prefix in the BGP RIB
252 &{mapping} Create Dictionary
253 ... IP=${CONTROLLER_IPV4}
254 ... HOLDTIME=${HOLDTIME}
255 ... PEER_PORT=${BGP_TOOL_PORT}
257 ... BGP_RIB=${RIB_INSTANCE}
258 ... PASSIVE_MODE=true
259 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
260 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
261 BuiltIn.Wait_Until_Keyword_Succeeds
264 ... TemplatedRequests.Get_As_Json_Templated
265 ... ${BGP_VAR_FOLDER}/bgp_rib
266 ... session=${CONFIG_SESSION}
267 ... mapping=${mapping}
269 Delete_Injected_Ipv6_Routes_1
270 [Documentation] Delete the injected IPV6 routes
271 &{mapping} Create Dictionary
273 ... HOLDTIME=${HOLDTIME}
274 ... PEER_PORT=${BGP_TOOL_PORT}
276 ... BGP_RIB=${RIB_INSTANCE}
277 ... PASSIVE_MODE=true
278 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
279 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
280 TemplatedRequests.Delete_Templated
281 ... ${BGP_VAR_FOLDER}/ipv6_route_injection
282 ... mapping=${mapping}
283 ... session=${CONFIG_SESSION}
284 KarafKeywords.Fail If Exceptions Found During Test ${SUITE_NAME}.${TEST_NAME} fail=${True}
286 Delete_Bgp_Peer_Configuration_4
287 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
288 &{mapping} Create Dictionary
290 ... HOLDTIME=${HOLDTIME}
291 ... PEER_PORT=${BGP_TOOL_PORT}
293 ... BGP_RIB=${RIB_INSTANCE}
294 ... PASSIVE_MODE=true
295 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
296 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
297 TemplatedRequests.Delete_Templated
298 ... ${BGP_VAR_FOLDER}/bgp_neighbor_rib
299 ... mapping=${mapping}
300 ... session=${CONFIG_SESSION}
302 Verify_Ipv6_Topology_Empty_4
303 [Documentation] Verifies that example-ipv6-topology is empty after deconfiguring peer for the first time.
305 Verify_Rib_Status_Empty
307 Reconfigure_ODL_To_Accept_Connections_5
308 [Documentation] Configure BGP peer modules with initiate-connection set to false with short ipv6 address.
309 &{mapping} Create Dictionary
311 ... HOLDTIME=${HOLDTIME}
312 ... PEER_PORT=${BGP_TOOL_PORT}
314 ... BGP_RIB=${RIB_INSTANCE}
315 ... PASSIVE_MODE=true
316 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
317 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
318 TemplatedRequests.Put_As_Xml_Templated
319 ... ${BGP_VAR_FOLDER}/bgp_peer
320 ... mapping=${mapping}
321 ... session=${CONFIG_SESSION}
324 [Documentation] Inject the Ipv6 route from controller
325 &{mapping} Create Dictionary
327 ... HOLDTIME=${HOLDTIME}
328 ... PEER_PORT=${BGP_TOOL_PORT}
330 ... BGP_RIB=${RIB_INSTANCE}
331 ... PASSIVE_MODE=true
332 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
333 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
334 TemplatedRequests.Post_As_Xml_Templated
335 ... ${BGP_VAR_FOLDER}/ipv6_route_injection
336 ... mapping=${mapping}
337 ... session=${CONFIG_SESSION}
339 Check_Ipv6_Prefix_In_Bgp_Rib_2
340 [Documentation] Check for the presence of Ipv6 Prefix in the BGP RIB
341 &{mapping} Create Dictionary
342 ... IP=${CONTROLLER_IPV4}
343 ... HOLDTIME=${HOLDTIME}
344 ... PEER_PORT=${BGP_TOOL_PORT}
346 ... BGP_RIB=${RIB_INSTANCE}
347 ... PASSIVE_MODE=true
348 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
349 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
350 BuiltIn.Wait_Until_Keyword_Succeeds
353 ... TemplatedRequests.Get_As_Json_Templated
354 ... ${BGP_VAR_FOLDER}/bgp_rib
355 ... session=${CONFIG_SESSION}
356 ... mapping=${mapping}
358 Delete_Injected_Ipv6_Routes_2
359 [Documentation] Delete the injected IPV6 routes
360 &{mapping} Create Dictionary
362 ... HOLDTIME=${HOLDTIME}
363 ... PEER_PORT=${BGP_TOOL_PORT}
365 ... BGP_RIB=${RIB_INSTANCE}
366 ... PASSIVE_MODE=true
367 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
368 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
369 TemplatedRequests.Delete_Templated
370 ... ${BGP_VAR_FOLDER}/ipv6_route_injection
371 ... mapping=${mapping}
372 ... session=${CONFIG_SESSION}
373 KarafKeywords.Fail If Exceptions Found During Test ${SUITE_NAME}.${TEST_NAME} fail=${True}
376 [Documentation] Deletes bgp application peer.
377 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
378 &{mapping} Create Dictionary
380 ... HOLDTIME=${HOLDTIME}
381 ... PEER_PORT=${BGP_TOOL_PORT}
383 ... BGP_RIB=${RIB_INSTANCE}
384 ... PASSIVE_MODE=true
385 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
386 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
387 TemplatedRequests.Delete_Templated
388 ... ${BGP_VAR_FOLDER}/application_peer
389 ... mapping=${mapping}
390 ... session=${CONFIG_SESSION}
392 Delete_Bgp_Peer_Configuration_5
393 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
394 &{mapping} Create Dictionary
396 ... HOLDTIME=${HOLDTIME}
397 ... PEER_PORT=${BGP_TOOL_PORT}
399 ... BGP_RIB=${RIB_INSTANCE}
400 ... PASSIVE_MODE=true
401 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
402 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
403 TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION}
405 Verify_Ipv6_Topology_Empty_5
406 [Documentation] Verifies that example-ipv6-topology is empty after deconfiguring peer for the first time.
408 Verify_Rib_Status_Empty
411 [Documentation] Save exabgp logs as exaipv6.log, and stop exabgp with ctrl-c bash signal
412 BGPcliKeywords.Store_File_To_Workspace ${EXABGP2_LOG} ${EXABGP2_LOG}
413 ExaBgpLib.Stop_ExaBgp
414 ${Log_Content} OperatingSystem.Get File ${EXABGP2_LOG}
417 Reconfigure_ODL_To_Accept_Connections_6
418 [Documentation] Configure BGP peer modules with initiate-connection set to false with short ipv6 address.
419 &{mapping} Create Dictionary
421 ... HOLDTIME=${HOLDTIME}
422 ... PEER_PORT=${BGP_TOOL_PORT}
424 ... BGP_RIB=${RIB_INSTANCE}
425 ... PASSIVE_MODE=true
426 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
427 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
428 TemplatedRequests.Put_As_Xml_Templated
429 ... ${BGP_VAR_FOLDER}/graceful_restart
430 ... mapping=${mapping}
431 ... session=${CONFIG_SESSION}
434 [Documentation] Start exabgp with
436 ${cmd} BuiltIn.Set_Variable ${EXABGP3_CFG} > ${EXABGP3_LOG}
437 ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cmd} ${CONFIG_SESSION} ${EXABGP_ID}
440 [Documentation] Save exabgp logs as exabgp_graceful_restart.log, and stop exabgp with ctrl-c bash signal
441 BGPcliKeywords.Store_File_To_Workspace ${EXABGP3_LOG} ${EXABGP3_LOG}
442 ExaBgpLib.Stop_ExaBgp
444 KarafKeywords.Fail If Exceptions Found During Test ${SUITE_NAME}.${TEST_NAME} fail=${True}
447 [Documentation] Start exabgp with
449 ${cmd} BuiltIn.Set_Variable ${EXABGP3_CFG} > ${EXABGP3_LOG}
450 ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cmd} ${CONFIG_SESSION} ${EXABGP_ID}
452 Delete_Bgp_Peer_Configuration_6
453 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
454 &{mapping} Create Dictionary
456 ... HOLDTIME=${HOLDTIME}
457 ... PEER_PORT=${BGP_TOOL_PORT}
459 ... BGP_RIB=${RIB_INSTANCE}
460 ... PASSIVE_MODE=true
461 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
462 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
463 TemplatedRequests.Delete_Templated
464 ... ${BGP_VAR_FOLDER}/graceful_restart
465 ... mapping=${mapping}
466 ... session=${CONFIG_SESSION}
469 [Documentation] Save exabgp logs as exabgp_graceful_restart.log, and stop exabgp with ctrl-c bash signal
470 BGPcliKeywords.Store_File_To_Workspace ${EXABGP3_LOG} ${EXABGP3_LOG}
471 ExaBgpLib.Stop_ExaBgp
473 Reconfigure_ODL_To_Accept_Connections_7
474 [Documentation] Configure BGP peer modules with initiate-connection set to false with short ipv6 address.
476 &{mapping} Create Dictionary
478 ... HOLDTIME=${HOLDTIME}
479 ... PEER_PORT=${BGP_TOOL_PORT}
481 ... BGP_RIB=${RIB_INSTANCE}
482 ... PASSIVE_MODE=true
483 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
484 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
485 TemplatedRequests.Put_As_Xml_Templated
486 ... ${BGP_VAR_FOLDER}/bgp_peer
487 ... mapping=${mapping}
488 ... session=${CONFIG_SESSION}
491 [Documentation] Start exabgp with
493 ${cmd} BuiltIn.Set_Variable ${EXABGP4_CFG} > ${EXABGP4_LOG}
494 ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cmd} ${CONFIG_SESSION} ${EXABGP_ID}
496 Delete_Bgp_Peer_Configuration_7
497 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
499 &{mapping} Create Dictionary
501 ... HOLDTIME=${HOLDTIME}
502 ... PEER_PORT=${BGP_TOOL_PORT}
504 ... BGP_RIB=${RIB_INSTANCE}
505 ... PASSIVE_MODE=true
506 ... BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
507 ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
508 TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION}
511 [Documentation] Save exabgp logs as exabgp_graceful_restart.log, and stop exabgp with ctrl-c bash signal
513 BGPcliKeywords.Store_File_To_Workspace ${EXABGP4_LOG} ${EXABGP4_LOG}
514 ExaBgpLib.Stop_ExaBgp
519 [Documentation] Suite setup keyword.
520 SetupUtils.Setup_Utils_For_Setup_And_Teardown
521 ${conn_id} SSHLibrary.Open Connection ${ODL_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=10s
522 Builtin.Set_Suite_Variable ${conn_id}
523 SSHKeywords.Flexible_Controller_Login
524 Configure_Ipv6_Network
525 SSHKeywords.Virtual_Env_Create
526 SSHKeywords.Virtual_Env_Install_Package setuptools==44.0.0
527 SSHKeywords.Virtual_Env_Install_Package exabgp==4.2.4
528 RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH}
530 Upload_Config_Files_exabgp_ipv4
531 Upload_Config_Files_exabgp_graceful_restart
532 Upload_Config_Files_Exabgp_AS_Value_Reconfigured
535 [Documentation] Suite teardown keyword
536 SSHKeywords.Virtual_Env_Delete
537 SSHLibrary.Close_All_Connections
538 RequestsLibrary.Delete_All_Sessions
539 BuiltIn.Run Keyword And Ignore Error ExaBgpLib.Stop_ExaBgp
541 Configure_Ipv6_Network
542 [Documentation] Reconfigures basic network settings on controller
543 SSHLibrary.Execute_Command sudo ip -6 addr add ${IPV6_IP}/${IPV6_PREFIX_LENGTH} dev eth0
544 SSHLibrary.Execute_Command sudo ip -6 route add default via ${IPV6_IP_GW}
545 ${stdout} SSHLibrary.Execute_Command sudo ip -6 addr show
547 ${stdout} SSHLibrary.Execute_Command sudo ip -6 route show
550 Verify_Rib_Status_Empty
551 [Documentation] Verifies that example-ipv6-topology is empty
552 BuiltIn.Wait_Until_Keyword_Succeeds
555 ... TemplatedRequests.Get_As_Json_Templated
556 ... ${BGP_VAR_FOLDER}/ipv6_topology_empty
557 ... session=${CONFIG_SESSION}
560 Verify_Rib_Status_Filled
561 [Documentation] Verifies that example-ipv6-topology is filled with ipv6 route
562 BuiltIn.Wait_Until_Keyword_Succeeds
565 ... TemplatedRequests.Get_As_Json_Templated
566 ... ${BGP_VAR_FOLDER}/ipv6_topology_filled
567 ... session=${CONFIG_SESSION}
571 [Documentation] Uploads exabgp config files
572 SSHLibrary.Put_File ${BGP_VAR_FOLDER}/${EXABGP_CFG} .
573 @{cfgfiles} SSHLibrary.List_Files_In_Directory . *.cfg
574 FOR ${cfgfile} IN @{cfgfiles}
575 SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${IPV6_IP}/g' ${cfgfile}
576 SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${CONTROLLER_IPV6}/g' ${cfgfile}
577 SSHLibrary.Execute_Command sed -i -e 's/ROUTERID/${EXABGP_ID}/g' ${cfgfile}
578 SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
579 SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
580 ${stdout} SSHLibrary.Execute_Command cat ${cfgfile}
584 Upload_Config_Files_exabgp_ipv4
585 [Documentation] Uploads exabgp config files
586 SSHLibrary.Put_File ${BGP_VAR_FOLDER}/${EXABGP2_CFG} .
587 @{cfgfiles} SSHLibrary.List_Files_In_Directory . *ipv4.cfg
588 FOR ${cfgfile} IN @{cfgfiles}
589 SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/127.0.0.1/g' ${cfgfile}
590 SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile}
591 SSHLibrary.Execute_Command sed -i -e 's/ROUTERID/127.0.0.1/g' ${cfgfile}
592 SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
593 SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
594 ${stdout} SSHLibrary.Execute_Command cat ${cfgfile}
598 Upload_Config_Files_exabgp_graceful_restart
599 [Documentation] Uploads exabgp config files
600 SSHLibrary.Put_File ${BGP_VAR_FOLDER}/${EXABGP3_CFG} .
601 @{cfgfiles} SSHLibrary.List_Files_In_Directory . *restart.cfg
602 FOR ${cfgfile} IN @{cfgfiles}
603 SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${IPV6_IP}/g' ${cfgfile}
604 SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${CONTROLLER_IPV6}/g' ${cfgfile}
605 SSHLibrary.Execute_Command sed -i -e 's/ROUTERID/${EXABGP_ID}/g' ${cfgfile}
606 SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
607 SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
608 ${stdout} SSHLibrary.Execute_Command cat ${cfgfile}
612 Upload_Config_Files_Exabgp_AS_Value_Reconfigured
613 [Documentation] Uploads exabgp config files
614 SSHLibrary.Put_File ${BGP_VAR_FOLDER}/${EXABGP4_CFG} .
615 @{cfgfiles} SSHLibrary.List_Files_In_Directory . *exa4.cfg
616 FOR ${cfgfile} IN @{cfgfiles}
617 SSHLibrary.Execute_Command sed -i -e 's/EXABGPIP/${IPV6_IP}/g' ${cfgfile}
618 SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${CONTROLLER_IPV6}/g' ${cfgfile}
619 SSHLibrary.Execute_Command sed -i -e 's/ROUTERID/${EXABGP_ID}/g' ${cfgfile}
620 SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
621 SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
622 ${stdout} SSHLibrary.Execute_Command cat ${cfgfile}