2 Documentation BGP performance of ingesting from 1 iBGP peer, data change counter is NOT used.
4 ... Copyright (c) 2015-2016 Cisco Systems, Inc. and others. 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 uses play.py as single iBGP peer which talks to
11 ... single controller in three node cluster configuration.
12 ... Test suite checks changes of the the example-ipv4-topology-<dst_id> on all nodes.
13 ... RIB is not examined.
14 ... <dst-id> is recognized during the suite run, should be the Leader of default
15 ... operational Shard, otherwise the scenario would fail due to
16 ... https://bugs.opendaylight.org/show_bug.cgi?id=5536
18 Library SSHLibrary timeout=10s
19 Library RequestsLibrary
20 Resource ../../../libraries/BGPcliKeywords.robot
21 Resource ../../../libraries/BGPSpeaker.robot
22 Resource ../../../libraries/ClusterManagement.robot
23 Resource ../../../libraries/FailFast.robot
24 Resource ../../../libraries/KillPythonTool.robot
25 Resource ../../../libraries/PrefixCounting.robot
26 Resource ../../../libraries/SetupUtils.robot
27 Resource ../../../libraries/SSHKeywords.robot
28 Resource ../../../libraries/TemplatedRequests.robot
29 Resource ../../../variables/Variables.robot
30 Resource PrefixcountKeywords.robot
32 Suite Setup PrefixcountKeywords.Setup_Everything
33 Suite Teardown PrefixcountKeywords.Teardown_Everything
34 Test Setup SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
35 Test Teardown SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed
43 Get Example Bgp Rib Owner
44 [Documentation] Find an odl node which is able to accept incomming connection.
45 ${rib_owner} ${rib_candidates} ClusterManagement.Get_Owner_And_Successors_For_device
49 BuiltIn.Set_Suite_Variable ${rib_owner} ${rib_owner}
50 BuiltIn.Set_Suite_Variable ${rib_owner_node_id} ${ODL_SYSTEM_${rib_owner}_IP}
51 ${session} ClusterManagement.Resolve_Http_Session_For_Member ${rib_owner}
52 BuiltIn.Set_Suite_Variable ${config_session} ${session}
54 Check_For_Empty_Ipv4_Topology_Before_Talking_1
55 [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
57 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
58 BuiltIn.Wait_Until_Keyword_Succeeds
59 ... ${INITIAL_RESTCONF_TIMEOUT}
61 ... PrefixCounting.Check_Ipv4_Topology_Is_Empty
62 ... session=${operational_1}
63 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
65 Check_For_Empty_Ipv4_Topology_Before_Talking_2
66 [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
68 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
69 BuiltIn.Wait_Until_Keyword_Succeeds
70 ... ${INITIAL_RESTCONF_TIMEOUT}
72 ... PrefixCounting.Check_Ipv4_Topology_Is_Empty
73 ... session=${operational_2}
74 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
76 Check_For_Empty_Ipv4_Topology_Before_Talking_3
77 [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
79 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
80 BuiltIn.Wait_Until_Keyword_Succeeds
81 ... ${INITIAL_RESTCONF_TIMEOUT}
83 ... PrefixCounting.Check_Ipv4_Topology_Is_Empty
84 ... session=${operational_3}
85 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
87 Reconfigure_ODL_To_Accept_Connection
88 [Documentation] Configure BGP peer module with initiate-connection set to false.
89 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
90 &{mapping} BuiltIn.Create_Dictionary
91 ... DEVICE_NAME=${DEVICE_NAME}
92 ... BGP_NAME=${BGP_PEER_NAME}
93 ... IP=${TOOLS_SYSTEM_IP}
94 ... HOLDTIME=${HOLDTIME}
95 ... PEER_PORT=${BGP_TOOL_PORT}
97 ... BGP_RIB=${RIB_INSTANCE}
99 ... BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
100 TemplatedRequests.Put_As_Json_Templated
101 ... ${BGP_VARIABLES_FOLDER}
102 ... mapping=${mapping}
103 ... session=${config_session}
104 [Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
106 Start_Talking_BGP_Speaker
107 [Documentation] Start Python speaker to connect to ODL.
108 PrefixcountKeywords.Start_Bgp_Peer_And_Verify_Connected connection_retries=${3}
110 Wait_For_Stable_Talking_Ipv4_Topology_1
111 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 1.
112 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable
113 ... timeout=${bgp_filling_timeout}
114 ... period=${CHECK_PERIOD}
115 ... repetitions=${REPETITIONS}
117 ... session=${operational_1}
118 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
120 Wait_For_Stable_Talking_Ipv4_Topology_2
121 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 2.
122 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable
123 ... timeout=${bgp_filling_timeout}
124 ... period=${CHECK_PERIOD}
125 ... repetitions=${REPETITIONS}
127 ... session=${operational_2}
128 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
130 Wait_For_Stable_Talking_Ipv4_Topology_3
131 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 3.
132 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable
133 ... timeout=${bgp_filling_timeout}
134 ... period=${CHECK_PERIOD}
135 ... repetitions=${REPETITIONS}
137 ... session=${operational_3}
138 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
140 Check_Talking_Ipv4_Topology_Count_1
141 [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 1.
143 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
144 PrefixCounting.Check_Ipv4_Topology_Count
146 ... session=${operational_1}
147 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
149 Check_Talking_Ipv4_Topology_Count_2
150 [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 2.
152 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
153 PrefixCounting.Check_Ipv4_Topology_Count
155 ... session=${operational_2}
156 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
158 Check_Talking_Ipv4_Topology_Count_3
159 [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 3.
161 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
162 PrefixCounting.Check_Ipv4_Topology_Count
164 ... session=${operational_3}
165 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
167 Kill_Talking_BGP_Speaker
168 [Documentation] Abort the Python speaker. Also, attempt to stop failing fast.
170 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
171 BGPSpeaker.Kill_BGP_Speaker
172 FailFast.Do_Not_Fail_Fast_From_Now_On
174 Wait_For_Stable_Ipv4_Topology_After_Listening_1
175 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 1.
177 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable
178 ... timeout=${bgp_filling_timeout}
179 ... period=${CHECK_PERIOD}
180 ... repetitions=${REPETITIONS}
181 ... excluded_count=${COUNT}
182 ... session=${operational_1}
183 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
185 Wait_For_Stable_Ipv4_Topology_After_Listening_2
186 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 2.
188 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable
189 ... timeout=${bgp_filling_timeout}
190 ... period=${CHECK_PERIOD}
191 ... repetitions=${REPETITIONS}
192 ... excluded_count=${COUNT}
193 ... session=${operational_2}
194 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
196 Wait_For_Stable_Ipv4_Topology_After_Listening_3
197 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 3.
199 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable
200 ... timeout=${bgp_filling_timeout}
201 ... period=${CHECK_PERIOD}
202 ... repetitions=${REPETITIONS}
203 ... excluded_count=${COUNT}
204 ... session=${operational_3}
205 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
207 Check_For_Empty_Ipv4_Topology_After_Listening_1
208 [Documentation] Example-ipv4-topology should be empty now as seen from node 1.
210 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
211 PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_1} topology=${EXAMPLE_IPV4_TOPOLOGY}
213 Check_For_Empty_Ipv4_Topology_After_Listening_2
214 [Documentation] Example-ipv4-topology should be empty now as seen from node 2.
216 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
217 PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_2} topology=${EXAMPLE_IPV4_TOPOLOGY}
219 Check_For_Empty_Ipv4_Topology_After_Listening_3
220 [Documentation] Example-ipv4-topology should be empty now as seen from node 3.
222 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
223 PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_3} topology=${EXAMPLE_IPV4_TOPOLOGY}
225 Delete_Bgp_Peer_Configuration
226 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
227 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
228 &{mapping} BuiltIn.Create_Dictionary
229 ... DEVICE_NAME=${DEVICE_NAME}
230 ... BGP_NAME=${BGP_PEER_NAME}
231 ... IP=${TOOLS_SYSTEM_IP}
232 ... HOLDTIME=${HOLDTIME}
233 ... PEER_PORT=${BGP_TOOL_PORT}
235 ... BGP_RIB=${RIB_INSTANCE}
236 ... BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
237 TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${config_session}