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)
18 Suite Setup PrefixcountKeywords.Setup_Everything
19 Suite Teardown PrefixcountKeywords.Teardown_Everything
20 Test Setup SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
21 Test Teardown SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed
22 Library SSHLibrary timeout=10s
23 Library RequestsLibrary
24 Resource ${CURDIR}/../../../variables/Variables.robot
25 Resource ${CURDIR}/../../../libraries/BGPSpeaker.robot
26 Resource ${CURDIR}/../../../libraries/BGPcliKeywords.robot
27 Resource ${CURDIR}/../../../libraries/FailFast.robot
28 Resource ${CURDIR}/../../../libraries/KillPythonTool.robot
29 Resource ${CURDIR}/../../../libraries/PrefixCounting.robot
30 Resource ${CURDIR}/../../../libraries/SetupUtils.robot
31 Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
32 Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
33 Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
34 Resource ${CURDIR}/PrefixcountKeywords.robot
40 Get Example Bgp Rib Owner
41 [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.
42 ... This node should be used for bgp peer to connect to.
43 ${rib_owner} ${rib_candidates}= ClusterManagement.Get_Owner_And_Successors_For_device example-bgp-rib org.opendaylight.mdsal.ServiceEntityType 1
44 BuiltIn.Set_Suite_Variable ${rib_owner} ${rib_owner}
45 BuiltIn.Set_Suite_Variable ${rib_owner_node_id} ${ODL_SYSTEM_${rib_owner}_IP}
46 ${session} = ClusterManagement.Resolve_Http_Session_For_Member ${rib_owner}
47 BuiltIn.Set_Suite_Variable ${config_session} ${session}
49 Check_For_Empty_Ipv4_Topology_Before_Talking_1
50 [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
52 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
53 BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_1} topology=${EXAMPLE_IPV4_TOPOLOGY}
55 Check_For_Empty_Ipv4_Topology_Before_Talking_2
56 [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
58 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
59 BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_2} topology=${EXAMPLE_IPV4_TOPOLOGY}
61 Check_For_Empty_Ipv4_Topology_Before_Talking_3
62 [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
64 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
65 BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_3} topology=${EXAMPLE_IPV4_TOPOLOGY}
67 Reconfigure_ODL_To_Accept_Connection
68 [Documentation] Configure BGP peer module with initiate-connection set to false.
69 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
70 &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
71 ... INITIATE=false BGP_RIB=${RIB_INSTANCE} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
72 TemplatedRequests.Put_As_Json_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${config_session}
73 [Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
75 Start_Talking_BGP_Speaker
76 [Documentation] Start Python speaker to connect to ODL.
77 PrefixcountKeywords.Start_Bgp_Peer_And_Verify_Connected connection_retries=${3}
79 Wait_For_Stable_Talking_Ipv4_Topology_1
80 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 1.
81 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${operational_1} topology=${EXAMPLE_IPV4_TOPOLOGY}
82 ... shards_list=${SHARD_MONITOR_LIST} shards_details=${init_shard_details}
84 Wait_For_Stable_Talking_Ipv4_Topology_2
85 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 2.
86 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${operational_2} topology=${EXAMPLE_IPV4_TOPOLOGY}
88 Wait_For_Stable_Talking_Ipv4_Topology_3
89 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 3.
90 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${operational_3} topology=${EXAMPLE_IPV4_TOPOLOGY}
92 Check_Talking_Ipv4_Topology_Count_1
93 [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 1.
95 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
96 PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${operational_1} topology=${EXAMPLE_IPV4_TOPOLOGY}
98 Check_Talking_Ipv4_Topology_Count_2
99 [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 2.
101 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
102 PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${operational_2} topology=${EXAMPLE_IPV4_TOPOLOGY}
104 Check_Talking_Ipv4_Topology_Count_3
105 [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 3.
107 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
108 PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${operational_3} topology=${EXAMPLE_IPV4_TOPOLOGY}
110 Kill_Talking_BGP_Speaker
111 [Documentation] Abort the Python speaker. Also, attempt to stop failing fast.
113 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
114 BGPSpeaker.Kill_BGP_Speaker
115 FailFast.Do_Not_Fail_Fast_From_Now_On
117 Wait_For_Stable_Ipv4_Topology_After_Listening_1
118 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 1.
120 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${operational_1} topology=${EXAMPLE_IPV4_TOPOLOGY}
122 Wait_For_Stable_Ipv4_Topology_After_Listening_2
123 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 2.
125 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${operational_2} topology=${EXAMPLE_IPV4_TOPOLOGY}
127 Wait_For_Stable_Ipv4_Topology_After_Listening_3
128 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 3.
130 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${operational_3} topology=${EXAMPLE_IPV4_TOPOLOGY}
132 Check_For_Empty_Ipv4_Topology_After_Listening_1
133 [Documentation] Example-ipv4-topology should be empty now as seen from node 1.
135 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
136 PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_1} topology=${EXAMPLE_IPV4_TOPOLOGY}
138 Check_For_Empty_Ipv4_Topology_After_Listening_2
139 [Documentation] Example-ipv4-topology should be empty now as seen from node 2.
141 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
142 PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_2} topology=${EXAMPLE_IPV4_TOPOLOGY}
144 Check_For_Empty_Ipv4_Topology_After_Listening_3
145 [Documentation] Example-ipv4-topology should be empty now as seen from node 3.
147 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
148 PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${operational_3} topology=${EXAMPLE_IPV4_TOPOLOGY}
150 Delete_Bgp_Peer_Configuration
151 [Documentation] Revert the BGP configuration to the original state: without any configured peers.
152 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
153 &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
154 ... INITIATE=false BGP_RIB=${RIB_INSTANCE} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG}
155 TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${config_session}