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 default operational
13 ... shard leader only. Less stress for cluster is expected as if followers were
14 ... triggered for that.
15 Suite Setup PrefixcountKeywords.Setup_Everything
16 Suite Teardown PrefixcountKeywords.Teardown_Everything
17 Test Setup SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
18 Test Teardown SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed
19 Library SSHLibrary timeout=10s
20 Library RequestsLibrary
21 Variables ${CURDIR}/../../../variables/Variables.py
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
37 Get Example Bgp Rib Owner
38 [Documentation] Find an odl node which is able to accept incomming connection. To this node netconf connector should be configured.
39 ${rib_owner} ${rib_candidates}= ClusterManagement.Get_Owner_And_Successors_For_device example-bgp-rib org.opendaylight.mdsal.ServiceEntityType 1
40 BuiltIn.Set_Suite_Variable ${rib_owner} ${rib_owner}
41 BuiltIn.Set_Suite_Variable ${rib_owner_node_id} ${ODL_SYSTEM_${rib_owner}_IP}
42 RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_${rib_owner}_IP}:${RESTCONFPORT} auth=${AUTH} timeout=10 max_retries=0
44 Get Topology Operational Leader
45 [Documentation] Gets the operational topology shard leader
46 ${leader} ${followers}= ClusterManagement.Get_Leader_And_Followers_For_Shard shard_name=topology shard_type=operational
47 BuiltIn.Set_Suite_Variable ${topo_lead_ses} operational-${leader}
49 Check_For_Empty_Ipv4_Topology_Before_Talking
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=${topo_lead_ses} topology=${EXAMPLE_IPV4_TOPOLOGY}
55 Reconfigure_ODL_To_Accept_Connection
56 [Documentation] Configure BGP peer module in passive mode (not initiating connection)
57 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
58 &{mapping} Create Dictionary BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT} PASSIVE_MODE=true
59 TemplatedRequests.Put_As_Xml_Templated ${BGP_PEER_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
60 [Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
62 Start_Talking_BGP_Speaker
63 [Documentation] Start Python speaker to connect to ODL.
64 PrefixcountKeywords.Start_Bgp_Peer_And_Verify_Connected connection_retries=${3}
66 Wait_For_Stable_Talking_Ipv4_Topology
67 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable. This is done by checking stability of prefix count as seen from node 1.
68 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${topo_lead_ses} topology=${EXAMPLE_IPV4_TOPOLOGY}
70 Check_Talking_Ipv4_Topology_Count
71 [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY} and fail if the count is not correct as seen from node 1.
73 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
74 PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${topo_lead_ses} topology=${EXAMPLE_IPV4_TOPOLOGY}
76 Kill_Talking_BGP_Speaker
77 [Documentation] Abort the Python speaker. Also, attempt to stop failing fast.
79 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
80 BGPSpeaker.Kill_BGP_Speaker
81 FailFast.Do_Not_Fail_Fast_From_Now_On
83 Wait_For_Stable_Ipv4_Topology_After_Listening
84 [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY} becomes stable again as seen from node 1.
86 PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${topo_lead_ses} topology=${EXAMPLE_IPV4_TOPOLOGY}
88 Check_For_Empty_Ipv4_Topology_After_Listening
89 [Documentation] Example-ipv4-topology should be empty now as seen from node 1.
91 [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
92 PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${topo_lead_ses} topology=${EXAMPLE_IPV4_TOPOLOGY}
94 Delete_Bgp_Peer_Configuration
95 [Documentation] Revert the BGP configuration to the original state: without any configured peers
96 &{mapping} Create Dictionary BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} IP=${TOOLS_SYSTEM_IP}
97 TemplatedRequests.Delete_Templated ${BGP_PEER_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}