2 Documentation BGP performance of ingesting from 1 iBGP peer, data change counter is NOT used.
4 ... Copyright (c) 2015-2017 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 on all nodes.
13 ... RIB is not examined.
15 ... singlepeer_pc_shm_1route:
16 ... pc - prefix counting
17 ... shm - shard monitoring (during the process of prefix advertizing)
19 Library SSHLibrary timeout=10s
20 Library RequestsLibrary
21 Resource ${CURDIR}/../../../variables/Variables.robot
22 Resource ${CURDIR}/../../../libraries/BGPSpeaker.robot
23 Resource ${CURDIR}/../../../libraries/BGPcliKeywords.robot
24 Resource ${CURDIR}/../../../libraries/FailFast.robot
25 Resource ${CURDIR}/../../../libraries/KillPythonTool.robot
26 Resource ${CURDIR}/../../../libraries/PrefixCounting.robot
27 Resource ${CURDIR}/../../../libraries/SetupUtils.robot
28 Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
29 Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
30 Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
31 Resource ${CURDIR}/PrefixcountKeywords.robot
33 Suite Setup PrefixcountKeywords.Setup_Everything
34 Suite Teardown PrefixcountKeywords.Teardown_Everything
35 Test Setup SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
36 Test Teardown SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed
44 Get Example Bgp Rib Owner
45 [Documentation] Find an odl node which is able to accept incomming connection. It is a node, which is the owner of bgp rib, as it is a singleton service.
46 ... This node should be used for bgp peer to connect to.
47 ${rib_owner} ${rib_candidates} ClusterManagement.Get_Owner_And_Successors_For_device
51 BuiltIn.Set_Suite_Variable ${rib_owner} ${rib_owner}
52 BuiltIn.Set_Suite_Variable ${rib_owner_node_id} ${ODL_SYSTEM_${rib_owner}_IP}
53 ${session} ClusterManagement.Resolve_Http_Session_For_Member ${rib_owner}
54 BuiltIn.Set_Suite_Variable ${config_session} ${session}
56 Check_For_Empty_Ipv4_Topology_Before_Talking_1
57 [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
59 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
60 BuiltIn.Wait_Until_Keyword_Succeeds
61 ... ${INITIAL_RESTCONF_TIMEOUT}
63 ... PrefixCounting.Check_Ipv4_Topology_Is_Empty
64 ... session=${operational_1}
65 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
67 Check_For_Empty_Ipv4_Topology_Before_Talking_2
68 [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
70 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
71 BuiltIn.Wait_Until_Keyword_Succeeds
72 ... ${INITIAL_RESTCONF_TIMEOUT}
74 ... PrefixCounting.Check_Ipv4_Topology_Is_Empty
75 ... session=${operational_2}
76 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
78 Check_For_Empty_Ipv4_Topology_Before_Talking_3
79 [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
81 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
82 BuiltIn.Wait_Until_Keyword_Succeeds
83 ... ${INITIAL_RESTCONF_TIMEOUT}
85 ... PrefixCounting.Check_Ipv4_Topology_Is_Empty
86 ... session=${operational_3}
87 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
89 Reconfigure_ODL_To_Accept_Connection
90 [Documentation] Configure BGP peer module with initiate-connection set to false.
91 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
92 &{mapping} BuiltIn.Create_Dictionary
93 ... DEVICE_NAME=${DEVICE_NAME}
94 ... BGP_NAME=${BGP_PEER_NAME}
95 ... IP=${TOOLS_SYSTEM_IP}
96 ... HOLDTIME=${HOLDTIME}
97 ... PEER_PORT=${BGP_TOOL_PORT}
99 ... BGP_RIB=${RIB_INSTANCE}
100 ... PASSIVE_MODE=true
101 ... BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
102 TemplatedRequests.Put_As_Json_Templated
103 ... ${BGP_VARIABLES_FOLDER}
104 ... mapping=${mapping}
105 ... session=${config_session}
106 [Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
108 Start_Talking_BGP_Speaker
109 [Documentation] Start Python speaker to connect to ODL.
110 PrefixcountKeywords.Start_Bgp_Peer_And_Verify_Connected connection_retries=${3}
112 Wait_For_Stable_Talking_Ipv4_Topology_1
113 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 1.
114 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable
115 ... timeout=${bgp_filling_timeout}
116 ... period=${CHECK_PERIOD}
117 ... repetitions=${REPETITIONS}
119 ... session=${operational_1}
120 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
121 ... shards_list=${SHARD_MONITOR_LIST}
122 ... shards_details=${init_shard_details}
124 Wait_For_Stable_Talking_Ipv4_Topology_2
125 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 2.
126 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable
127 ... timeout=${bgp_filling_timeout}
128 ... period=${CHECK_PERIOD}
129 ... repetitions=${REPETITIONS}
131 ... session=${operational_2}
132 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
134 Wait_For_Stable_Talking_Ipv4_Topology_3
135 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 3.
136 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable
137 ... timeout=${bgp_filling_timeout}
138 ... period=${CHECK_PERIOD}
139 ... repetitions=${REPETITIONS}
141 ... session=${operational_3}
142 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
144 Check_Talking_Ipv4_Topology_Count_1
145 [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 1.
147 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
148 PrefixCounting.Check_Ipv4_Topology_Count
150 ... session=${operational_1}
151 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
153 Check_Talking_Ipv4_Topology_Count_2
154 [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 2.
156 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
157 PrefixCounting.Check_Ipv4_Topology_Count
159 ... session=${operational_2}
160 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
162 Check_Talking_Ipv4_Topology_Count_3
163 [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 3.
165 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
166 PrefixCounting.Check_Ipv4_Topology_Count
168 ... session=${operational_3}
169 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
171 Kill_Talking_BGP_Speaker
172 [Documentation] Abort the Python speaker. Also, attempt to stop failing fast.
174 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
175 BGPSpeaker.Kill_BGP_Speaker
176 FailFast.Do_Not_Fail_Fast_From_Now_On
178 Wait_For_Stable_Ipv4_Topology_After_Listening_1
179 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 1.
181 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable
182 ... timeout=${bgp_filling_timeout}
183 ... period=${CHECK_PERIOD}
184 ... repetitions=${REPETITIONS}
185 ... excluded_count=${COUNT}
186 ... session=${operational_1}
187 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
189 Wait_For_Stable_Ipv4_Topology_After_Listening_2
190 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 2.
192 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable
193 ... timeout=${bgp_filling_timeout}
194 ... period=${CHECK_PERIOD}
195 ... repetitions=${REPETITIONS}
196 ... excluded_count=${COUNT}
197 ... session=${operational_2}
198 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
200 Wait_For_Stable_Ipv4_Topology_After_Listening_3
201 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 3.
203 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable
204 ... timeout=${bgp_filling_timeout}
205 ... period=${CHECK_PERIOD}
206 ... repetitions=${REPETITIONS}
207 ... excluded_count=${COUNT}
208 ... session=${operational_3}
209 ... topology=${EXAMPLE_IPV4_TOPOLOGY}
211 Check_For_Empty_Ipv4_Topology_After_Listening_1
212 [Documentation] Example-ipv4-topology should be empty now as seen from node 1.
214 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
215 PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_1} topology=${EXAMPLE_IPV4_TOPOLOGY}
217 Check_For_Empty_Ipv4_Topology_After_Listening_2
218 [Documentation] Example-ipv4-topology should be empty now as seen from node 2.
220 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
221 PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_2} topology=${EXAMPLE_IPV4_TOPOLOGY}
223 Check_For_Empty_Ipv4_Topology_After_Listening_3
224 [Documentation] Example-ipv4-topology should be empty now as seen from node 3.
226 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
227 PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_3} topology=${EXAMPLE_IPV4_TOPOLOGY}
229 Delete_Bgp_Peer_Configuration
230 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
231 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
232 &{mapping} BuiltIn.Create_Dictionary
233 ... DEVICE_NAME=${DEVICE_NAME}
234 ... BGP_NAME=${BGP_PEER_NAME}
235 ... IP=${TOOLS_SYSTEM_IP}
236 ... HOLDTIME=${HOLDTIME}
237 ... PEER_PORT=${BGP_TOOL_PORT}
239 ... BGP_RIB=${RIB_INSTANCE}
240 ... BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
241 TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${config_session}