+++ /dev/null
-*** Settings ***
-Documentation BGP performance of ingesting from 1 iBGP peer, data change counter is NOT used.
-...
-... Copyright (c) 2015-2016 Cisco Systems, Inc. and others. All rights reserved.
-...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
-...
-... This suite uses play.py as single iBGP peer which talks to
-... single controller in three node cluster configuration.
-... Test suite checks changes of the the example-ipv4-topology-<dst_id> on all nodes.
-... RIB is not examined.
-... <dst-id> is recognized during the suite run, should be the Leader of default
-... operational Shard, otherwise the scenario would fail due to
-... https://bugs.opendaylight.org/show_bug.cgi?id=5536
-Suite Setup PrefixcountKeywords.Setup_Everything
-Suite Teardown PrefixcountKeywords.Teardown_Everything
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed
-Library SSHLibrary timeout=10s
-Library RequestsLibrary
-Variables ${CURDIR}/../../../variables/Variables.py
-Resource ${CURDIR}/../../../libraries/BGPSpeaker.robot
-Resource ${CURDIR}/../../../libraries/BGPcliKeywords.robot
-Resource ${CURDIR}/../../../libraries/FailFast.robot
-Resource ${CURDIR}/../../../libraries/KillPythonTool.robot
-Resource ${CURDIR}/../../../libraries/PrefixCounting.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource ${CURDIR}/PrefixcountKeywords.robot
-
-*** Variables ***
-${COUNT} 1
-${EXAMPLE_IPV4_TOPOLOGY_PREF} example-ipv4-topology-
-
-*** Test Cases ***
-Get Default Operational Shard Leader
- ${dos_leader} ${dos_followers}= ClusterManagement.Get_Leader_And_Followers_For_Shard
- BuiltIn.Set_Suite_Variable ${dos_leader} ${dos_leader}
- BuiltIn.Set_Suite_Variable ${default_oper_shard_leader_node_ip} ${ODL_SYSTEM_${dos_leader}_IP}
- RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_${dos_leader}_IP}:${RESTCONFPORT} auth=${AUTH} timeout=10 max_retries=0
-
-Check_For_Empty_Ipv4_Topology_Before_Talking_1
- [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_For_Empty_Ipv4_Topology_Before_Talking_2
- [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_For_Empty_Ipv4_Topology_Before_Talking_3
- [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Configure_Netconf_Device
- [Documentation] Configures and verifies netconf device configuration. If configuration is not successful, it de-configures the device before the next attempt.
- &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} DEVICE_PORT=1830 DEVICE_IP=${default_oper_shard_leader_node_ip} DEVICE_USER=admin DEVICE_PASSWORD=admin
- # After the netconf device is configured, odl starts downloading schemas. If the downloading will not finish within akka timeout, more tries are needed, 3 is based on a user experience.
- : FOR ${index} IN RANGE 0 3
- \ ${status} ${value}= Run Keyword And Ignore Error PrefixcountKeywords.Configure_Netconf_Device_And_Check_Mounted ${mapping}
- \ Exit For Loop If '${status}' == 'PASS'
- \ Run Keyword Unless '${status}' == 'PASS' TemplatedRequests.Delete_Templated ${NETCONF_DEV_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
- Run Keyword Unless '${status}' == 'PASS' Fail
-
-Reconfigure_ODL_To_Accept_Connection
- [Documentation] Configure BGP peer module with initiate-connection set to false.
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
- ... INITIATE=false BGP_RIB=${RIB_INSTANCE}
- TemplatedRequests.Put_As_Json_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
- [Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
-Start_Talking_BGP_Speaker
- [Documentation] Start Python speaker to connect to ODL.
- PrefixcountKeywords.Start_Bgp_Peer_And_Verify_Connected connection_retries=${3} peerip=${default_oper_shard_leader_node_ip}
-
-Wait_For_Stable_Talking_Ipv4_Topology_1
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable. This is done by checking stability of prefix count as seen from node 1.
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Wait_For_Stable_Talking_Ipv4_Topology_2
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable. This is done by checking stability of prefix count as seen from node 2.
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Wait_For_Stable_Talking_Ipv4_Topology_3
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable. This is done by checking stability of prefix count as seen from node 3.
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_Talking_Ipv4_Topology_Count_1
- [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} and fail if the count is not correct as seen from node 1.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_Talking_Ipv4_Topology_Count_2
- [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} and fail if the count is not correct as seen from node 2.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_Talking_Ipv4_Topology_Count_3
- [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} and fail if the count is not correct as seen from node 3.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Kill_Talking_BGP_Speaker
- [Documentation] Abort the Python speaker. Also, attempt to stop failing fast.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- BGPSpeaker.Kill_BGP_Speaker
- FailFast.Do_Not_Fail_Fast_From_Now_On
-
-Wait_For_Stable_Ipv4_Topology_After_Listening_1
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable again as seen from node 1.
- [Tags] critical
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Wait_For_Stable_Ipv4_Topology_After_Listening_2
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable again as seen from node 2.
- [Tags] critical
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Wait_For_Stable_Ipv4_Topology_After_Listening_3
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable again as seen from node 3.
- [Tags] critical
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_For_Empty_Ipv4_Topology_After_Listening_1
- [Documentation] Example-ipv4-topology should be empty now as seen from node 1.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_For_Empty_Ipv4_Topology_After_Listening_2
- [Documentation] Example-ipv4-topology should be empty now as seen from node 2.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_For_Empty_Ipv4_Topology_After_Listening_3
- [Documentation] Example-ipv4-topology should be empty now as seen from node 3.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Delete_Bgp_Peer_Configuration
- [Documentation] Revert the BGP configuration to the original state: without any configured peers.
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
- ... INITIATE=false BGP_RIB=${RIB_INSTANCE}
- TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
-
-Delete_Netconf_Device_Configuration
- [Documentation] Revert the netconf configuration to the original stat
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} DEVICE_PORT=1830 DEVICE_IP=${default_oper_shard_leader_node_ip} DEVICE_USER=admin DEVICE_PASSWORD=admin
- TemplatedRequests.Delete_Templated ${NETCONF_DEV_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
+++ /dev/null
-*** Settings ***
-Documentation BGP performance of ingesting from 1 iBGP peer, data change counter is NOT used.
-...
-... Copyright (c) 2015-2016 Cisco Systems, Inc. and others. All rights reserved.
-...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
-...
-... This suite uses play.py as single iBGP peer which talks to
-... single controller in three node cluster configuration.
-... Test suite checks changes of the the example-ipv4-topology-<dst_id> on all nodes.
-... RIB is not examined.
-... <dst-id> is recognized during the suite run, should be the Leader of default
-... operational Shard, otherwise the scenario would fail due to
-... https://bugs.opendaylight.org/show_bug.cgi?id=5536
-Suite Setup PrefixcountKeywords.Setup_Everything
-Suite Teardown PrefixcountKeywords.Teardown_Everything
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed
-Library SSHLibrary timeout=10s
-Library RequestsLibrary
-Variables ${CURDIR}/../../../variables/Variables.py
-Resource ${CURDIR}/../../../libraries/BGPSpeaker.robot
-Resource ${CURDIR}/../../../libraries/BGPcliKeywords.robot
-Resource ${CURDIR}/../../../libraries/FailFast.robot
-Resource ${CURDIR}/../../../libraries/KillPythonTool.robot
-Resource ${CURDIR}/../../../libraries/PrefixCounting.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource ${CURDIR}/PrefixcountKeywords.robot
-
-*** Variables ***
-${COUNT} 100000
-${EXAMPLE_IPV4_TOPOLOGY_PREF} example-ipv4-topology-
-
-*** Test Cases ***
-Get Default Operational Shard Leader
- ${dos_leader} ${dos_followers}= ClusterManagement.Get_Leader_And_Followers_For_Shard
- BuiltIn.Set_Suite_Variable ${dos_leader} ${dos_leader}
- BuiltIn.Set_Suite_Variable ${default_oper_shard_leader_node_ip} ${ODL_SYSTEM_${dos_leader}_IP}
- RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_${dos_leader}_IP}:${RESTCONFPORT} auth=${AUTH} timeout=10 max_retries=0
-
-Check_For_Empty_Ipv4_Topology_Before_Talking_1
- [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_For_Empty_Ipv4_Topology_Before_Talking_2
- [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_For_Empty_Ipv4_Topology_Before_Talking_3
- [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Configure_Netconf_Device
- [Documentation] Configures and verifies netconf device configuration. If configuration is not successful, it de-configures the device before the next attempt.
- &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} DEVICE_PORT=1830 DEVICE_IP=${default_oper_shard_leader_node_ip} DEVICE_USER=admin DEVICE_PASSWORD=admin
- # After the netconf device is configured, odl starts downloading schemas. If the downloading will not finish within akka timeout, more tries are needed, 3 is based on a user experience.
- : FOR ${index} IN RANGE 0 3
- \ ${status} ${value}= Run Keyword And Ignore Error PrefixcountKeywords.Configure_Netconf_Device_And_Check_Mounted ${mapping}
- \ Exit For Loop If '${status}' == 'PASS'
- \ Run Keyword Unless '${status}' == 'PASS' TemplatedRequests.Delete_Templated ${NETCONF_DEV_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
- Run Keyword Unless '${status}' == 'PASS' Fail
-
-Reconfigure_ODL_To_Accept_Connection
- [Documentation] Configure BGP peer module with initiate-connection set to false.
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
- ... INITIATE=false BGP_RIB=${RIB_INSTANCE}
- TemplatedRequests.Put_As_Json_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
- [Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
-Start_Talking_BGP_Speaker
- [Documentation] Start Python speaker to connect to ODL.
- PrefixcountKeywords.Start_Bgp_Peer_And_Verify_Connected connection_retries=${3} peerip=${default_oper_shard_leader_node_ip}
-
-Wait_For_Stable_Talking_Ipv4_Topology_1
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable. This is done by checking stability of prefix count as seen from node 1.
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Wait_For_Stable_Talking_Ipv4_Topology_2
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable. This is done by checking stability of prefix count as seen from node 2.
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Wait_For_Stable_Talking_Ipv4_Topology_3
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable. This is done by checking stability of prefix count as seen from node 3.
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_Talking_Ipv4_Topology_Count_1
- [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} and fail if the count is not correct as seen from node 1.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_Talking_Ipv4_Topology_Count_2
- [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} and fail if the count is not correct as seen from node 2.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_Talking_Ipv4_Topology_Count_3
- [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} and fail if the count is not correct as seen from node 3.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Kill_Talking_BGP_Speaker
- [Documentation] Abort the Python speaker. Also, attempt to stop failing fast.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- BGPSpeaker.Kill_BGP_Speaker
- FailFast.Do_Not_Fail_Fast_From_Now_On
-
-Wait_For_Stable_Ipv4_Topology_After_Listening_1
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable again as seen from node 1.
- [Tags] critical
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Wait_For_Stable_Ipv4_Topology_After_Listening_2
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable again as seen from node 2.
- [Tags] critical
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Wait_For_Stable_Ipv4_Topology_After_Listening_3
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable again as seen from node 3.
- [Tags] critical
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_For_Empty_Ipv4_Topology_After_Listening_1
- [Documentation] Example-ipv4-topology should be empty now as seen from node 1.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_For_Empty_Ipv4_Topology_After_Listening_2
- [Documentation] Example-ipv4-topology should be empty now as seen from node 2.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_For_Empty_Ipv4_Topology_After_Listening_3
- [Documentation] Example-ipv4-topology should be empty now as seen from node 3.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Delete_Bgp_Peer_Configuration
- [Documentation] Revert the BGP configuration to the original state: without any configured peers.
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
- ... INITIATE=false BGP_RIB=${RIB_INSTANCE}
- TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
-
-Delete_Netconf_Device_Configuration
- [Documentation] Revert the netconf configuration to the original stat
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} DEVICE_PORT=1830 DEVICE_IP=${default_oper_shard_leader_node_ip} DEVICE_USER=admin DEVICE_PASSWORD=admin
- TemplatedRequests.Delete_Templated ${NETCONF_DEV_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
+++ /dev/null
-*** Settings ***
-Documentation BGP performance of ingesting from 1 iBGP peer, data change counter is NOT used.
-...
-... Copyright (c) 2015-2016 Cisco Systems, Inc. and others. All rights reserved.
-...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
-...
-... This suite uses play.py as single iBGP peer which talks to
-... single controller in three node cluster configuration.
-... Test suite checks changes of the the example-ipv4-topology-<dst_id> on all nodes.
-... RIB is not examined.
-... <dst-id> is recognized during the suite run, should be the Leader of default
-... operational Shard, otherwise the scenario would fail due to
-... https://bugs.opendaylight.org/show_bug.cgi?id=5536
-Suite Setup PrefixcountKeywords.Setup_Everything
-Suite Teardown PrefixcountKeywords.Teardown_Everything
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed
-Library SSHLibrary timeout=10s
-Library RequestsLibrary
-Variables ${CURDIR}/../../../variables/Variables.py
-Resource ${CURDIR}/../../../libraries/BGPSpeaker.robot
-Resource ${CURDIR}/../../../libraries/BGPcliKeywords.robot
-Resource ${CURDIR}/../../../libraries/FailFast.robot
-Resource ${CURDIR}/../../../libraries/KillPythonTool.robot
-Resource ${CURDIR}/../../../libraries/PrefixCounting.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/ClusterManagement.robot
-Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource ${CURDIR}/PrefixcountKeywords.robot
-
-*** Variables ***
-${COUNT} 1000000
-${EXAMPLE_IPV4_TOPOLOGY_PREF} example-ipv4-topology-
-
-*** Test Cases ***
-Get Default Operational Shard Leader
- ${dos_leader} ${dos_followers}= ClusterManagement.Get_Leader_And_Followers_For_Shard
- BuiltIn.Set_Suite_Variable ${dos_leader} ${dos_leader}
- BuiltIn.Set_Suite_Variable ${default_oper_shard_leader_node_ip} ${ODL_SYSTEM_${dos_leader}_IP}
- RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_${dos_leader}_IP}:${RESTCONFPORT} auth=${AUTH} timeout=10 max_retries=0
-
-Check_For_Empty_Ipv4_Topology_Before_Talking_1
- [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_For_Empty_Ipv4_Topology_Before_Talking_2
- [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_For_Empty_Ipv4_Topology_Before_Talking_3
- [Documentation] Wait for ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} to come up and empty. Give large timeout for case when BGP boots slower than restconf.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- BuiltIn.Wait_Until_Keyword_Succeeds ${INITIAL_RESTCONF_TIMEOUT} 1s PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Configure_Netconf_Device
- [Documentation] Configures and verifies netconf device configuration. If configuration is not successful, it de-configures the device before the next attempt.
- &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} DEVICE_PORT=1830 DEVICE_IP=${default_oper_shard_leader_node_ip} DEVICE_USER=admin DEVICE_PASSWORD=admin
- # After the netconf device is configured, odl starts downloading schemas. If the downloading will not finish within akka timeout, more tries are needed, 3 is based on a user experience.
- : FOR ${index} IN RANGE 0 3
- \ ${status} ${value}= Run Keyword And Ignore Error PrefixcountKeywords.Configure_Netconf_Device_And_Check_Mounted ${mapping}
- \ Exit For Loop If '${status}' == 'PASS'
- \ Run Keyword Unless '${status}' == 'PASS' TemplatedRequests.Delete_Templated ${NETCONF_DEV_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
- Run Keyword Unless '${status}' == 'PASS' Fail
-
-Reconfigure_ODL_To_Accept_Connection
- [Documentation] Configure BGP peer module with initiate-connection set to false.
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
- ... INITIATE=false BGP_RIB=${RIB_INSTANCE}
- TemplatedRequests.Put_As_Json_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
- [Teardown] SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-
-Start_Talking_BGP_Speaker
- [Documentation] Start Python speaker to connect to ODL.
- PrefixcountKeywords.Start_Bgp_Peer_And_Verify_Connected connection_retries=${3} peerip=${default_oper_shard_leader_node_ip}
-
-Wait_For_Stable_Talking_Ipv4_Topology_1
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable. This is done by checking stability of prefix count as seen from node 1.
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Wait_For_Stable_Talking_Ipv4_Topology_2
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable. This is done by checking stability of prefix count as seen from node 2.
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Wait_For_Stable_Talking_Ipv4_Topology_3
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable. This is done by checking stability of prefix count as seen from node 3.
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=0 session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_Talking_Ipv4_Topology_Count_1
- [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} and fail if the count is not correct as seen from node 1.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_Talking_Ipv4_Topology_Count_2
- [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} and fail if the count is not correct as seen from node 2.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_Talking_Ipv4_Topology_Count_3
- [Documentation] Count the routes in ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} and fail if the count is not correct as seen from node 3.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Count ${COUNT} session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Kill_Talking_BGP_Speaker
- [Documentation] Abort the Python speaker. Also, attempt to stop failing fast.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- BGPSpeaker.Kill_BGP_Speaker
- FailFast.Do_Not_Fail_Fast_From_Now_On
-
-Wait_For_Stable_Ipv4_Topology_After_Listening_1
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable again as seen from node 1.
- [Tags] critical
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Wait_For_Stable_Ipv4_Topology_After_Listening_2
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable again as seen from node 2.
- [Tags] critical
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Wait_For_Stable_Ipv4_Topology_After_Listening_3
- [Documentation] Wait until ${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader} becomes stable again as seen from node 3.
- [Tags] critical
- PrefixCounting.Wait_For_Ipv4_Topology_Prefixes_To_Become_Stable timeout=${bgp_filling_timeout} period=${CHECK_PERIOD} repetitions=${REPETITIONS} excluded_count=${COUNT} session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_For_Empty_Ipv4_Topology_After_Listening_1
- [Documentation] Example-ipv4-topology should be empty now as seen from node 1.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_1} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_For_Empty_Ipv4_Topology_After_Listening_2
- [Documentation] Example-ipv4-topology should be empty now as seen from node 2.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_2} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Check_For_Empty_Ipv4_Topology_After_Listening_3
- [Documentation] Example-ipv4-topology should be empty now as seen from node 3.
- [Tags] critical
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- PrefixCounting.Check_Ipv4_Topology_Is_Empty session=${CONFIGURATION_3} topology=${EXAMPLE_IPV4_TOPOLOGY_PREF}${dos_leader}
-
-Delete_Bgp_Peer_Configuration
- [Documentation] Revert the BGP configuration to the original state: without any configured peers.
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
- ... INITIATE=false BGP_RIB=${RIB_INSTANCE}
- TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
-
-Delete_Netconf_Device_Configuration
- [Documentation] Revert the netconf configuration to the original stat
- [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
- &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} DEVICE_PORT=1830 DEVICE_IP=${default_oper_shard_leader_node_ip} DEVICE_USER=admin DEVICE_PASSWORD=admin
- TemplatedRequests.Delete_Templated ${NETCONF_DEV_FOLDER} mapping=${mapping} session=${CONFIG_SESSION}
+++ /dev/null
-*** Settings ***
-Documentation Basic tests for iBGP peers.
-...
-... Copyright (c) 2015-2016 Cisco Systems, Inc. and others. All rights reserved.
-...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
-...
-... Test suite performs basic iBGP functional test case for
-... carrying LSP State Information in BGP as described in
-... http://tools.ietf.org/html/draft-ietf-idr-te-lsp-distribution-03
-Suite Setup Setup_Everything
-Suite Teardown BgpOperations.Teardown_Everything
-Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
-Test Teardown SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed
-Library OperatingSystem
-Library RequestsLibrary
-Library DateTime
-Variables ${CURDIR}/../../../variables/Variables.py
-Variables ${CURDIR}/../../../variables/bgpuser/variables.py ${TOOLS_SYSTEM_IP} ${ODL_STREAM}
-Resource ${CURDIR}/../../../libraries/BGPcliKeywords.robot
-Resource ${CURDIR}/../../../libraries/BgpOperations.robot
-Resource ${CURDIR}/../../../libraries/BGPSpeaker.robot
-Resource ${CURDIR}/../../../libraries/FailFast.robot
-Resource ${CURDIR}/../../../libraries/KarafKeywords.robot
-Resource ${CURDIR}/../../../libraries/KillPythonTool.robot
-Resource ${CURDIR}/../../../libraries/SetupUtils.robot
-Resource ${CURDIR}/../../../libraries/SSHKeywords.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource ${CURDIR}/../../../libraries/Utils.robot
-Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
-
-*** Variables ***
-${BGP_VARIABLES_FOLDER} ${CURDIR}/../../../variables/bgpuser/
-${COUNT} 1
-${HOLDTIME} 180
-${BGP_PEER_LOG_FILE} bgp_peer.log
-${BGP_PEER_COMMAND} python play.py --amount ${COUNT} --myip=${TOOLS_SYSTEM_IP} --myport=${BGP_TOOL_PORT} --peerip=${ODL_SYSTEM_IP} --peerport=${ODL_BGP_PORT} --${BGP_PEER_LOG_LEVEL} --logfile ${BGP_PEER_LOG_FILE} --bgpls True
-${BGP_PEER_OPTIONS} &>${BGP_PEER_LOG_FILE}
-${DEFAULT_RIB_CHECK_PERIOD} 1s
-${DEFAULT_RIB_CHECK_TIMEOUT} 10s
-${BGP_PEER_LOG_LEVEL} debug
-${ODL_LOG_LEVEL} INFO
-${ODL_BGP_LOG_LEVEL} DEFAULT
-${JSONKEYSTR} "linkstate-route"
-${BGP_PEER_NAME} example-bgp-peer
-${DEVICE_NAME} controller-config
-${CONFIG_SESSION} config-session
-${RIB_INSTANCE} example-bgp-rib
-
-*** Test Cases ***
-TC1_Configure_iBGP_Peer
- [Documentation] Configure BGP peer module with initiate-connection set to false.
- [Tags] critical
- &{mapping} Create Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT}
- ... INITIATE=false RIB_INSTANCE_NAME=${RIB_INSTANCE}
- TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}${/}bgp_peer mapping=${mapping} session=${CONFIG_SESSION}
-
-TC1_Check_Example_Bgp_Rib_Is_Empty
- [Documentation] Check RIB for none linkstate-routes
- [Tags] critical
- SSHLibrary.Switch Connection bgp_peer_console
- BgpOperations.Check_Example_Bgp_Rib_Does_Not_Contain ${JSONKEYSTR}
-
-TC1_Connect_BGP_Peer
- [Documentation] Connect BGP peer with advertising the routes without mandatory params like LOC_PREF.
- [Tags] critical
- SSHLibrary.Switch Connection bgp_peer_console
- BGPcliKeywords.Start_Console_Tool ${BGP_PEER_COMMAND} ${BGP_PEER_OPTIONS}
- BGPcliKeywords.Read_And_Fail_If_Prompt_Is_Seen
-
-TC1_Check_Example_Bgp_Rib
- [Documentation] Check RIB for linkstate-route(s)
- [Tags] critical
- KarafKeywords.Log_Testcase_Start_To_Controller_Karaf
- SSHLibrary.Switch Connection bgp_peer_console
- BuiltIn.Wait_Until_Keyword_Succeeds ${DEFAULT_RIB_CHECK_TIMEOUT} ${DEFAULT_RIB_CHECK_PERIOD} BgpOperations.Check_Example_Bgp_Rib_Content ${JSONKEYSTR}
-
-TC1_Disconnect_BGP_Peer
- [Documentation] Stop BGP peer & store logs
- [Tags] critical
- SSHLibrary.Switch Connection bgp_peer_console
- BGPcliKeywords.Stop_Console_Tool
- BGPcliKeywords.Store_File_To_Workspace ${BGP_PEER_LOG_FILE} tc1_${BGP_PEER_LOG_FILE}
-
-TC1_Deconfigure_iBGP_Peer
- [Documentation] Revert the BGP configuration to the original state: without any configured peers.
- KarafKeywords.Log_Testcase_Start_To_Controller_Karaf
- &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME}
- TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION}
-
-*** Keywords ***
-Setup_Everything
- [Documentation] SSH-login to mininet machine, create HTTP session,
- ... prepare directories for responses, put Python tool to mininet machine, setup imported resources.
- SetupUtils.Setup_Utils_For_Setup_And_Teardown
- SSHLibrary.Set_Default_Configuration prompt=${TOOLS_SYSTEM_PROMPT}
- SSHLibrary.Open_Connection ${TOOLS_SYSTEM_IP} alias=bgp_peer_console
- Utils.Flexible_Mininet_Login
- SSHKeywords.Require_Python
- SSHKeywords.Assure_Library_Ipaddr target_dir=.
- SSHLibrary.Put_File ${CURDIR}/../../../../tools/fastbgp/play.py
- RequestsLibrary.Create_Session operational http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_API} auth=${AUTH}
- RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH}
- KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${ODL_LOG_LEVEL}
- KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${ODL_BGP_LOG_LEVEL} org.opendaylight.bgpcep
- KarafKeywords.Execute_Controller_Karaf_Command_On_Background log:set ${ODL_BGP_LOG_LEVEL} org.opendaylight.protocol
+++ /dev/null
-*** Settings ***
-Documentation TCPMD5 user-facing feature system tests, using PCEP.
-...
-... Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
-...
-... This program and the accompanying materials are made available under the
-... terms of the Eclipse Public License v1.0 which accompanies this distribution,
-... and is available at http://www.eclipse.org/legal/epl-v10.html
-...
-...
-... The original brief description of this suite is at
-... https://wiki.opendaylight.org/view/TCPMD5:Lithium_Feature_Tests#How_to_test
-Suite Setup Set_It_Up
-Suite Teardown Tear_It_Down
-Test Setup FailFast.Fail_This_Fast_On_Previous_Error
-Test Teardown FailFast.Start_Failing_Fast_If_This_Failed
-Library OperatingSystem
-Library RequestsLibrary
-Library SSHLibrary prompt=]>
-Library String
-Library ${CURDIR}/../../../libraries/norm_json.py
-Resource ${CURDIR}/../../../libraries/FailFast.robot
-Resource ${CURDIR}/../../../libraries/NexusKeywords.robot
-Resource ${CURDIR}/../../../libraries/PcepOperations.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-Resource ${CURDIR}/../../../libraries/WaitForFailure.robot
-Variables ${CURDIR}/../../../variables/Variables.py
-Variables ${CURDIR}/../../../variables/pcepuser/variables.py ${TOOLS_SYSTEM_IP}
-
-*** Variables ***
-${directory_for_actual_responses} ${TEMPDIR}${/}actual
-${directory_for_expected_responses} ${TEMPDIR}${/}expected
-${directory_with_template_folders} ${CURDIR}/../../../variables/tcpmd5user/
-
-*** Test Cases ***
-Topology_Precondition
- [Documentation] Compare current pcep-topology to empty one.
- ... Timeout is long enough to see that pcep is ready, with no PCC is connected.
- [Tags] critical
- BuiltIn.Wait_Until_Keyword_Succeeds 300 1 Compare_Topology ${off_json} 010_Precondition.json
-
-Start_Secure_Pcc_Mock
- [Documentation] Execute pcc-mock on Mininet with password set, fail if pcc-mock promptly exits. Keep pcc-mock running for next test cases.
- ${command}= NexusKeywords.Compose_Full_Java_Command -jar ${filename} --password topsecret --reconnect 1 --local-address ${TOOLS_SYSTEM_IP} --remote-address ${ODL_SYSTEM_IP} 2>&1 | tee pccmock.log
- BuiltIn.Log ${command}
- SSHLibrary.Write ${command}
- Read_And_Fail_If_Prompt_Is_Seen
-
-Topology_Unauthorized_1
- [Documentation] Try to catch a glimpse of pcc-mock in pcep-topology. Pass if no change from Precondition is detected over 1 minute.
- [Tags] critical
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout 10s 1s Compare_Topology ${off_json} 020_Unauthorized_1.json
-
-Enable_Tcpmd5_No_Password_Yet
- [Documentation] Send series of restconf puts derived from https://wiki.opendaylight.org/view/BGP_LS_PCEP:TCP_MD5_Guide#RESTCONF_Configuration
- ... Every put should return empty text with allwed status code.
- # No ${mapping_as_string} is given, as there are no placeholders present in the following folders.
- TemplatedRequests.Put_As_Xml_Templated ${directory_with_template_folders}${/}key_access_module
- TemplatedRequests.Put_As_Xml_Templated ${directory_with_template_folders}${/}key_access_service
- TemplatedRequests.Put_As_Xml_Templated ${directory_with_template_folders}${/}md5_client_channel_module
- TemplatedRequests.Put_As_Xml_Templated ${directory_with_template_folders}${/}md5_client_channel_service
- TemplatedRequests.Put_As_Xml_Templated ${directory_with_template_folders}${/}md5_server_channel_module
- TemplatedRequests.Put_As_Xml_Templated ${directory_with_template_folders}${/}md5_server_channel_service
- TemplatedRequests.Put_As_Xml_Templated ${directory_with_template_folders}${/}pcep_client_channel_module
- TemplatedRequests.Put_As_Xml_Templated ${directory_with_template_folders}${/}pcep_server_channel_module
-
-Check_For_Bug_3753_Via_Bug_4267
- [Documentation] Check state of disptcher configuration module, apply workaround if needed.
- ... This test case should not be failing, failure indicates Bug 3753 was not fixed enough yet.
- ... For more details, see https://bugs.opendaylight.org/show_bug.cgi?id=4267#c2
- ... As dispatcher configuration differs between Lithium and Beryllium, two checks and two workarounds are needed.
- ${success}= BuiltIn.Run_Keyword_And_Return_Status TemplatedRequests.Get_As_Json_Templated ${directory_with_template_folders}${/}pcep_dispatcher_module verify=${True}
- BuiltIn.Pass_Execution_If ${success} Bug 4267 not present, Beryllium data.
- ${success}= BuiltIn.Run_Keyword_And_Return_Status TemplatedRequests.Get_As_Json_Templated ${directory_with_template_folders}${/}lithium_pcep_dispatcher_module verify=${True}
- BuiltIn.Pass_Execution_If ${success} Bug 4267 not present, Lithium data.
- ${success}= BuiltIn.Run_Keyword_And_Return_Status TemplatedRequests.Put_As_Xml_Templated ${directory_with_template_folders}${/}pcep_dispatcher_module
- BuiltIn.Run_Keyword_If ${success} BuiltIn.Fail Bug 4267 present, Beryllium workaround successful.
- ${success}= BuiltIn.Run_Keyword_And_Return_Status TemplatedRequests.Put_As_Xml_Templated ${directory_with_template_folders}${/}lithium_pcep_dispatcher_module
- BuiltIn.Run_Keyword_If ${success} BuiltIn.Fail Bug 4267 present, Lithium workaround successful.
- BuiltIn.Fail Bug 4267 probably present. No workaround succeeded, so Bug 4491 is probably present too.
- [Teardown] FailFast.Do_Not_Start_Failing_If_This_Failed
-
-Topology_Unauthorized_2
- [Documentation] The same logic as Topology_Unauthorized_1 as no password was provided to ODL.
- [Tags] critical
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout 10s 1s Compare_Topology ${off_json} 030_Unauthorized_2.json
-
-Set_Wrong_Password
- [Documentation] Configure password in pcep dispatcher for client with Mininet IP address.
- ... This password does not match what pcc-mock uses.
- ${password_line}= Construct_Password_Element_Line_Using_Password changeme
- BuiltIn.Log ${password_line}
- Replace_Password_Xml_Element_In_Pcep_Client_Module ${password_line}
-
-Topology_Unauthorized_3
- [Documentation] The same logic as Topology_Unauthorized_1 as incorrect password was provided to ODL.
- [Tags] critical
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout 10s 1s Compare_Topology ${off_json} 040_Unauthorized_3.json
-
-Set_Correct_Password
- [Documentation] Configure password in pcep dispatcher for client with Mininet IP address.
- ... This password finally matches what pcc-mock uses.
- ${password_line}= Construct_Password_Element_Line_Using_Password topsecret
- BuiltIn.Log ${password_line}
- Replace_Password_Xml_Element_In_Pcep_Client_Module ${password_line}
-
-Topology_Intercondition
- [Documentation] Compare pcep-topology to filled one, which includes a tunnel from pcc-mock.
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 1s Compare_Topology ${default_json} 050_Intercondition.json
-
-Update_Delegated
- [Documentation] Perform update-lsp on the mocked tunnel, check response is success.
- ${text}= PcepOperations.Update_Xml_Lsp_Return_Json ${update_delegated_xml}
- Pcep_Json_Is_Success ${text}
-
-Topology_Updated
- [Documentation] Compare pcep-topology to default_json, which includes the updated tunnel.
- [Tags] critical
- BuiltIn.Wait_Until_Keyword_succeeds 5s 1s Compare_Topology ${updated_json} 060_Topology_Updated.json
-
-Unset_Password
- [Documentation] De-configure password for pcep dispatcher for client with Mininet IP address.
- [Setup] FailFast.Run_Even_When_Failing_Fast
- Replace_Password_Xml_Element_In_Pcep_Client_Module ${EMPTY}
- FailFast.Do_Not_Fail_Fast_From_Now_On
- # NOTE: It is still possible to remain failing, if both previous and this test failed.
- [Teardown] FailFast.Do_Not_Start_Failing_If_This_Failed
-
-Topology_Unauthorized_4
- [Documentation] Wait for pcep-topology to become empty again.
- [Tags] critical
- BuiltIn.Wait_Until_Keyword_Succeeds 10s 1s Compare_Topology ${offjson} 070_Unauthorized_4.json
-
-Stop_Pcc_Mock
- [Documentation] Send ctrl+c to pcc-mock, fails if no prompt is seen
- ... after 3 seconds (the default for SSHLibrary)
- [Setup] FailFast.Run_Even_When_Failing_Fast
- # FIXME: Bgpcepuser has Write_Ctrl_C keyword. Re-use it.
- ${command}= BuiltIn.Evaluate chr(int(3))
- BuiltIn.Log ${command}
- SSHLibrary.Write ${command}
- SSHLibrary.Read_Until_Prompt
- FailFast.Do_Not_Fail_Fast_From_Now_On
- # NOTE: It is still possible to remain failing, if both previous and this test failed.
- [Teardown] FailFast.Do_Not_Start_Failing_If_This_Failed
-
-Topology_Postcondition
- [Documentation] Verify that pcep-topology stays empty.
- [Tags] critical
- WaitForFailure.Verify_Keyword_Does_Not_Fail_Within_Timeout 10 1 Compare_Topology ${offjson} 080_Postcondition.json
- # FIXME: We should delete config changes to not affect next suite.
-
-*** Keywords ***
-Set_It_Up
- [Documentation] Create SSH session to Mininet machine, prepare HTTP client session to Controller.
- ... Figure out latest pcc-mock version and download it from Nexus to Mininet.
- ... Also, delete and create directories for json diff handling.
- NexusKeywords.Initialize_Artifact_Deployment_And_Usage
- ${current_connection}= SSHLibrary.Get_Connection
- ${current_prompt}= BuiltIn.Set_Variable ${current_connection.prompt}
- BuiltIn.Log ${current_prompt}
- BuiltIn.Set_Suite_Variable ${prompt} ${current_prompt}
- RequestsLibrary.Create_Session ses http://${ODL_SYSTEM_IP}:${RESTCONFPORT}${OPERATIONAL_TOPO_API} auth=${AUTH}
- ${name}= NexusKeywords.Deploy_Test_Tool bgpcep pcep-pcc-mock
- BuiltIn.Set_Suite_Variable ${filename} ${name}
- OperatingSystem.Remove_Directory ${directory_for_expected_responses} recursive=True
- OperatingSystem.Remove_Directory ${directory_for_actual_responses} recursive=True
- # The previous suite may have been using the same directories.
- OperatingSystem.Create_Directory ${directory_for_expected_responses}
- OperatingSystem.Create_Directory ${directory_for_actual_responses}
- TemplatedRequests.Create_Default_Session
- PcepOperations.Setup_Pcep_Operations
- FailFast.Do_Not_Fail_Fast_From_Now_On
-
-Tear_It_Down
- [Documentation] Download pccmock.log and Log its contents.
- ... Compute and Log the diff between expected and actual normalized responses.
- ... Close both HTTP client session and SSH connection to Mininet.
- SSHLibrary.Get_File pccmock.log
- ${pccmocklog}= OperatingSystem.Run cat pccmock.log
- BuiltIn.Log ${pccmocklog}
- ${diff}= OperatingSystem.Run diff -dur ${directory_for_expected_responses} ${directory_for_actual_responses}
- BuiltIn.Log ${diff}
- PcepOperations.Teardown_Pcep_Operations
- RequestsLibrary.Delete_All_Sessions
- SSHLibrary.Close_All_Connections
-
-Read_And_Fail_If_Prompt_Is_Seen
- [Documentation] Try to read SSH to see prompt, but expect to see no prompt within SSHLibrary's timeout.
- BuiltIn.Run_Keyword_And_Expect_Error No match found for '${prompt}' in *. Read_Text_Before_Prompt
-
-Read_Text_Before_Prompt
- [Documentation] Log text gathered by SSHLibrary.Read_Until_Prompt.
- ... This needs to be a separate keyword just because how Read_And_Fail_If_Prompt_Is_Seen is implemented.
- ${text}= SSHLibrary.Read_Until_Prompt
- BuiltIn.Log ${text}
-
-Compare_Topology
- [Arguments] ${expected} ${name}
- [Documentation] Get current pcep-topology as json, normalize both expected and actual json.
- ... Save normalized jsons to files for later processing.
- ... Error codes and normalized jsons should match exactly.
- # FIXME: See bgpuser to move handling of expected outside WUKS loop, as in bgpuser suite.
- ${normexp}= norm_json.normalize_json_text ${expected}
- BuiltIn.Log ${normexp}
- OperatingSystem.Create_File ${directory_for_expected_responses}${/}${name} ${normexp}
- ${resp}= RequestsLibrary.Get_Request ses topology/pcep-topology
- BuiltIn.Log ${resp}
- BuiltIn.Log ${resp.text}
- ${normresp}= norm_json.normalize_json_text ${resp.text}
- BuiltIn.Log ${normresp}
- OperatingSystem.Create_File ${directory_for_actual_responses}${/}${name} ${normresp}
- BuiltIn.Should_Be_Equal_As_Strings ${resp.status_code} 200
- BuiltIn.Should_Be_Equal ${normresp} ${normexp}
-
-Construct_Password_Element_Line_Using_Password
- [Arguments] ${password}
- [Documentation] Return line with password XML element containing given password, whitespace is there so that data to send looks neat.
- ${element}= String.Replace_String ${SPACE}${SPACE}<password>$PASSWORD</password>${\n} $PASSWORD ${password}
- BuiltIn.Log ${element}
- [Return] ${element}
-
-Replace_Password_Xml_Element_In_Pcep_Client_Module
- [Arguments] ${password_element}
- [Documentation] Send restconf PUT to replace the config module specifying PCEP password element (may me empty=missing).
- &{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP} PASSWD=${password_element}
- TemplatedRequests.Put_As_Xml_Templated ${directory_with_template_folders}${/}pcep_topology_client_module mapping=${mapping}
+++ /dev/null
-# Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v1.0 which accompanies this distribution,
-# and is available at http://www.eclipse.org/legal/epl-v10.html
-
-# Place the suites in run order:
-integration/test/csit/suites/netconf/ready/netconfready.robot
-integration/test/csit/suites/bgpcep/bgpingest/singlepeer_prefixcount.robot
-integration/test/csit/suites/bgpcep/bgpingest/singlepeer_changecount.robot
-integration/test/csit/suites/bgpcep/bgpingest/bgp_app_peer_prefixcount.robot
-integration/test/csit/suites/bgpcep/bgpingest/manypeers_prefixcount.robot
-integration/test/csit/suites/bgpcep/bgpingest/manypeers_peercount.robot
-integration/test/csit/suites/bgpcep/bgpingest/manypeers_changecount.robot
+++ /dev/null
-# Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v1.0 which accompanies this distribution,
-# and is available at http://www.eclipse.org/legal/epl-v10.html
-
-# Place the suites in run order:
-integration/test/csit/suites/netconf/ready/netconfready.robot
-integration/test/csit/suites/bgpcep/bgpclustering/010_singlepeer_prefixcount_1route_Be.robot
-integration/test/csit/suites/bgpcep/bgpclustering/020_singlepeer_prefixcount_100kroutes_Be.robot
-integration/test/csit/suites/bgpcep/bgpclustering/030_singlepeer_prefixcount_1Mroutes_Be.robot
+++ /dev/null
-# Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v1.0 which accompanies this distribution,
-# and is available at http://www.eclipse.org/legal/epl-v10.html
-
-# Place the suites in run order:
-integration/test/csit/suites/netconf/ready/netconfready.robot
-integration/test/csit/suites/bgpcep/bgpfunct/050_bmp_basic.robot
-integration/test/csit/suites/bgpcep/pcepuser/pcepuser.robot
-integration/test/csit/suites/bgpcep/tcpmd5user/tcpmd5user-LiBe.robot
-integration/test/csit/suites/bgpcep/bgpuser/cases.robot
-integration/test/csit/suites/bgpcep/bgpuser/bgp_app_peer_basic.robot
-integration/test/csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot
-integration/test/csit/suites/bgpcep/bgpuser/ebgp_peers_basic.robot
-integration/test/csit/suites/bgpcep/bgpflowspec/010_bgp_flowspec.robot
-integration/test/csit/suites/bgpcep/bgpuser/ibgp_peer_lsp_Be.robot