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