2 Documentation Functional test for bgp - mvpn
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 distbmution,
8 ... and is available at http://www.eclipse.org/legal/epl-v10.html
10 ... This suite tests advertising mvpn routes to odl. For advertising play.py is used,
11 ... and particular files are stored as *.hex files. There are 7 different
12 ... types of routes used for auto-discovery of multicast network. Also 4 more routes
13 ... with new attributes specific for mvpn.
15 Library RequestsLibrary
18 Library ../../../libraries/BgpRpcClient.py ${TOOLS_SYSTEM_IP}
19 Resource ../../../libraries/BGPcliKeywords.robot
20 Resource ../../../libraries/BGPSpeaker.robot
21 Resource ../../../libraries/BgpOperations.robot
22 Resource ../../../libraries/SetupUtils.robot
23 Resource ../../../libraries/SSHKeywords.robot
24 Resource ../../../libraries/TemplatedRequests.robot
25 Resource ../../../variables/Variables.robot
27 Suite Setup Start_Suite
28 Suite Teardown Stop_Suite
29 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
34 ${CONFIG_SESSION} config-session
35 ${MVPN_DIR} ${CURDIR}/../../../variables/bgpfunctional/mvpn
36 ${PLAY_SCRIPT} ${CURDIR}/../../../../tools/fastbgp/play.py
37 ${RIB_NAME} example-bgp-rib
38 &{MVPN_APP_PEER} IP=${ODL_SYSTEM_IP} BGP_RIB=${RIB_NAME}
40 ... IP=${TOOLS_SYSTEM_IP}
41 ... HOLDTIME=${HOLDTIME}
42 ... PEER_PORT=${BGP_TOOL_PORT}
44 ... BGP_RIB=${RIB_NAME}
50 [Documentation] Configures bgp application peer.
51 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
52 TemplatedRequests.Put_As_Xml_Templated
53 ... ${MVPN_DIR}/app_peer
54 ... mapping=${MVPN_APP_PEER}
55 ... session=${CONFIG_SESSION}
57 Reconfigure_ODL_To_Accept_Connection
58 [Documentation] Configures BGP peer module with initiate-connection set to false.
59 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
60 TemplatedRequests.Put_As_Xml_Templated
61 ... ${MVPN_DIR}/bgp_peer
62 ... mapping=${MVPN_ODL_CONFIG}
63 ... session=${CONFIG_SESSION}
66 [Documentation] Start Python speaker to connect to ODL. We need to do WUKS until odl really starts to accept incomming bgp connection. The failure happens if the incomming connection comes too quickly after configuring the peer in the previous test case.
67 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
68 BuiltIn.Wait_Until_Keyword_Succeeds 3x 1s Start Bgp Peer
70 Odl_To_Play_intra_as_ipmsi_ad
71 [Template] Odl_To_Play_Template
72 intra_as_ipmsi_ad ${MVPN_DIR}
74 Play_To_Odl_intra_as_ipmsi_ad
75 [Template] Play_To_Odl_Template
76 intra_as_ipmsi_ad ${MVPN_DIR}
78 Odl_To_Play_inter_as_ipmsi_ad
79 [Template] Odl_To_Play_Template
80 inter_as_ipmsi_ad ${MVPN_DIR}
82 Play_To_Odl_inter_as_ipmsi_ad
83 [Template] Play_To_Odl_Template
84 inter_as_ipmsi_ad ${MVPN_DIR}
87 [Template] Odl_To_Play_Template
91 [Template] Play_To_Odl_Template
95 [Template] Odl_To_Play_Template
99 [Template] Play_To_Odl_Template
102 Odl_To_Play_source_active_ad
103 [Template] Odl_To_Play_Template
104 source_active_ad ${MVPN_DIR}
106 Play_To_Odl_source_active_ad
107 [Template] Play_To_Odl_Template
108 source_active_ad ${MVPN_DIR}
110 Odl_To_Play_shared_tree_join
111 [Template] Odl_To_Play_Template
112 shared_tree_join ${MVPN_DIR}
114 Play_To_Odl_shared_tree_join
115 [Template] Play_To_Odl_Template
116 shared_tree_join ${MVPN_DIR}
118 Odl_To_Play_source_tree_join
119 [Template] Odl_To_Play_Template
120 source_tree_join ${MVPN_DIR}
122 Play_To_Odl_source_tree_join
123 [Template] Play_To_Odl_Template
124 source_tree_join ${MVPN_DIR}
126 Odl_To_Play_intra_pe_distinguisher
127 [Template] Odl_To_Play_Template
128 intra_pe_distinguisher ${MVPN_DIR}
130 Play_To_Odl_intra_pe_distinguisher
131 [Template] Play_To_Odl_Template
132 intra_pe_distinguisher ${MVPN_DIR}
134 Odl_To_Play_intra_vrf
135 [Template] Odl_To_Play_Template
136 intra_vrf ${MVPN_DIR}
138 Play_To_Odl_intra_vrf
139 [Template] Play_To_Odl_Template
140 intra_vrf ${MVPN_DIR}
142 Odl_To_Play_intra_source_as
143 [Template] Odl_To_Play_Template
144 intra_source_as ${MVPN_DIR}
146 Play_To_Odl_intra_source_as
147 [Template] Play_To_Odl_Template
148 intra_source_as ${MVPN_DIR}
150 Odl_To_Play_intra_source_as_4
151 [Template] Odl_To_Play_Template
152 intra_source_as_4 ${MVPN_DIR}
154 Play_To_Odl_intra_source_as_4
155 [Template] Play_To_Odl_Template
156 intra_source_as_4 ${MVPN_DIR}
158 Play_To_Odl_intra_ipv6
159 [Template] Play_To_Odl_Template
160 intra_ipv6 ${MVPN_DIR} ipv6
162 Kill_Talking_BGP_Speaker
163 [Documentation] Abort the Python speaker
164 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
165 BGPSpeaker.Kill_BGP_Speaker
166 BGPcliKeywords.Store_File_To_Workspace play.py.out mvpn_play.log
168 Delete_Bgp_Peer_Configuration
169 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
170 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
171 TemplatedRequests.Delete_Templated
172 ... ${MVPN_DIR}/bgp_peer
173 ... mapping=${MVPN_ODL_CONFIG}
174 ... session=${CONFIG_SESSION}
177 [Documentation] Revert the BGP configuration to the original state: without application peer
178 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
179 TemplatedRequests.Delete_Templated ${MVPN_DIR}/app_peer mapping=${MVPN_APP_PEER} session=${CONFIG_SESSION}
184 [Documentation] Initialize SetupUtils. Suite setup keyword.
185 SetupUtils.Setup_Utils_For_Setup_And_Teardown
186 ${mininet_conn_id} = SSHLibrary.Open Connection
187 ... ${TOOLS_SYSTEM_IP}
188 ... prompt=${DEFAULT_LINUX_PROMPT}
190 Builtin.Set Suite Variable ${mininet_conn_id}
191 SSHKeywords.Flexible Mininet Login ${TOOLS_SYSTEM_USER}
192 RequestsLibrary.Create Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH}
193 SSHLibrary.Put File ${PLAY_SCRIPT} .
194 SSHKeywords.Assure_Library_Ipaddr target_dir=.
197 [Documentation] Suite teardown keyword
198 SSHLibrary.Close_All_Connections
199 RequestsLibrary.Delete_All_Sessions
202 [Documentation] Starts bgp peer and verifies that the peer runs.
203 BGPSpeaker.Start_BGP_Speaker
204 ... --amount 0 --myip=${TOOLS_SYSTEM_IP} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --peerport=${ODL_BGP_PORT} --debug --mvpn --wfr 1
205 BGPcliKeywords.Read_And_Fail_If_Prompt_Is_Seen