From: Tomas Markovic Date: Thu, 15 Feb 2018 09:33:01 +0000 (+0100) Subject: BGP RIB policies test X-Git-Tag: pre-potassium~876 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=4e3506899262a9561fec429dadbf76596bffb103;p=integration%2Ftest.git BGP RIB policies test This test suite is base for policies tests which will be filtering routes and peers based on policies set. It is running with 6 exabgps in background and app peer. Configurations of exabgp are subject to change based on policies applied. Change-Id: I4454feed28a07e9526245fba8e2dde83badc4a28 Signed-off-by: Tomas Markovic --- diff --git a/csit/libraries/ExaBgpLib.robot b/csit/libraries/ExaBgpLib.robot index 6173e89ae7..6b38c48622 100644 --- a/csit/libraries/ExaBgpLib.robot +++ b/csit/libraries/ExaBgpLib.robot @@ -15,8 +15,10 @@ Documentation Robot keyword library (Resource) for handling the ExaBgp tool. Library SSHLibrary Resource ${CURDIR}/SSHKeywords.robot Resource ${CURDIR}/RemoteBash.robot +Resource ${CURDIR}/BGPcliKeywords.robot *** Variables *** +${EXABGP_KILL_COMMAND} ps axf | grep exabgp | grep -v grep | awk '{print \"kill -9 \" $1}' | sh ${CMD} env exabgp.tcp.port=1790 exabgp --debug ${PEER_CHECK_URL} /restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F @@ -40,6 +42,13 @@ Stop_ExaBgp BuiltIn.Log ${output} SSHKeywords.Virtual_Env_Deactivate_On_Current_Session log_output=${True} +Stop_All_ExaBgps + [Documentation] Sends kill command to stop all exabgps running + ${output} SSHLibrary.Read + BuiltIn.Log ${output} + ${output} SSHLibrary.Write ${EXABGP_KILL_COMMAND} + BuiltIn.Log ${output} + Start_ExaBgp_And_Verify_Connected [Arguments] ${cfg_file} ${session} ${exabgp_ip} ${connection_retries}=${3} [Documentation] Starts the ExaBgp and verifies its connection. The verification is done by checking the presence diff --git a/csit/suites/bgpcep/bgpfunct/bgp_policies_default.robot b/csit/suites/bgpcep/bgpfunct/bgp_policies_default.robot new file mode 100644 index 0000000000..18aeb2a9b9 --- /dev/null +++ b/csit/suites/bgpcep/bgpfunct/bgp_policies_default.robot @@ -0,0 +1,136 @@ +*** Settings *** +Documentation Functional test for bgp routing policies +... +... Copyright (c) 2018 AT&T Intellectual Property. 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 7 peers: app peer, 2x rr-client, 2x ebgp, 2x ibgp +... Tests results on effective-rib-in dependant on their respective configurations. +... Peers 1,2,4,5 are testing multiple ipv4 routes with additional arguments. +... Peers 3,6 have ipv4 and ipv6 mpls-labeled routes. +Suite Setup Start_Suite +Suite Teardown Stop_Suite +Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing +Library RequestsLibrary +Library SSHLibrary +Resource ../../../variables/Variables.robot +Resource ../../../libraries/ExaBgpLib.robot +Resource ../../../libraries/SetupUtils.robot +Resource ../../../libraries/TemplatedRequests.robot +Resource ../../../libraries/SSHKeywords.robot + +*** Variables *** +${POLICIES_VAR} ${CURDIR}/../../../variables/bgpfunctional/bgppolicies +${CMD} env exabgp.tcp.port=1790 exabgp --debug +@{PEER_TYPES} ibgp_peer ibgp_peer ebgp_peer ebgp_peer rr_client_peer rr_client_peer +@{NUMBERS} 1 2 3 4 5 6 +${HOLDTIME} 180 +${RIB_INSTANCE} example-bgp-rib +${CONFIG_SESSION} config-session + +*** Test Cases *** +Verify_Rib_Empty + [Documentation] Checks empty example-ipv4-topology ready. + Verify_Rib_Status_Empty + +Configure_App_Peer + [Documentation] Configures bgp application peer, and configures it's routes. + &{mapping} BuiltIn.Create_Dictionary RIB_INSTANCE_NAME=${RIB_INSTANCE} APP_PEER_ID=${ODL_SYSTEM_IP} BGP_RIB_OPENCONFIG=${RIB_INSTANCE} IP=${ODL_SYSTEM_IP} + TemplatedRequests.Post_As_Xml_Templated ${POLICIES_VAR}/app_peer mapping=${mapping} session=${CONFIG_SESSION} + TemplatedRequests.Post_As_Xml_Templated ${POLICIES_VAR}/app_peer_route mapping=${mapping} session=${CONFIG_SESSION} + +Reconfigure_ODL_To_Accept_Connections + [Documentation] Configure BGP peer modules with initiate-connection set to false. + ... Configures 6 different peers, two internal, two external and two route-reflectors. + : FOR ${index} ${peer_type} IN ZIP ${NUMBERS} ${PEER_TYPES} + \ &{mapping} Create Dictionary IP=127.0.0.${index} HOLDTIME=${HOLDTIME} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${RIB_INSTANCE} + \ ... RIB_INSTANCE_NAME=${RIB_INSTANCE} + \ TemplatedRequests.Put_As_Xml_Templated ${POLICIES_VAR}${/}${peer_type} mapping=${mapping} session=${CONFIG_SESSION} + +Start_Exabgps + [Documentation] Start 6 exabgps as processes in background, each with it's own configuration. + SSHKeywords.Virtual_Env_Activate_On_Current_Session log_output=${True} + : FOR ${index} IN @{NUMBERS} + \ ${start_cmd} BuiltIn.Set_Variable ${CMD} exabgp${index}.cfg > exa${index}.log & + \ BuiltIn.Log ${start_cmd} + \ ${output} SSHLibrary.Write ${start_cmd} + \ BuiltIn.Log ${output} + +Verify_Rib_Filled + [Documentation] Verifies that sent routes are present in particular ribs. + [Tags] critical + Verify_Rib_Status + +Stop_All_Peers + [Documentation] Send command to kill all exabgp processes running on controller + ExaBgpLib.Stop_All_ExaBgps + : FOR ${index} IN @{NUMBERS} + \ BGPcliKeywords.Store_File_To_Workspace exa${index}.log exa${index}.log + +Delete_Bgp_Peer_Configuration + [Documentation] Revert the BGP configuration to the original state: without any configured peers. + : FOR ${index} ${peer_type} IN ZIP ${NUMBERS} ${PEER_TYPES} + \ &{mapping} Create Dictionary IP=127.0.0.${index} HOLDTIME=${HOLDTIME} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${RIB_INSTANCE} + \ ... RIB_INSTANCE_NAME=${RIB_INSTANCE} + \ TemplatedRequests.Delete_Templated ${POLICIES_VAR}/${peer_type} mapping=${mapping} session=${CONFIG_SESSION} + +Deconfigure_App_Peer + [Documentation] Revert the BGP configuration to the original state: without application peer + &{mapping} BuiltIn.Create_Dictionary IP=${ODL_SYSTEM_IP} BGP_RIB_OPENCONFIG=${RIB_INSTANCE} + TemplatedRequests.Delete_Templated ${POLICIES_VAR}/app_peer mapping=${mapping} session=${CONFIG_SESSION} + TemplatedRequests.Delete_Templated ${POLICIES_VAR}/app_peer_route mapping=${mapping} session=${CONFIG_SESSION} + +*** Keywords *** +Start_Suite + [Documentation] Suite setup keyword. + SetupUtils.Setup_Utils_For_Setup_And_Teardown + ${conn_id}= SSHLibrary.Open Connection ${ODL_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=10s + Builtin.Set_Suite_Variable ${conn_id} + SSHKeywords.Flexible_Controller_Login + SSHKeywords.Virtual_Env_Create + SSHKeywords.Virtual_Env_Install_Package exabgp==4.0.5 + RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} + Upload_Config_Files + +Stop_Suite + [Documentation] Suite teardown keyword + SSHKeywords.Virtual_Env_Delete + SSHLibrary.Close_All_Connections + RequestsLibrary.Delete_All_Sessions + +Verify_Rib_Status + [Documentation] Verify output from effective-rib-in for each of the 6 exabgp peers and app peer. + ... First request is for full example-bgp-rib and it's output is logged for debug purposes. + ... Each of the peers have different output which is stored in folder by their respective + ... numbers as peer_${index} (peer_1, peer_2 ...) + # gets and outputs full rib output for debug purposes if one of the peers reports faulty data. + ${output} TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/rib_state session=${CONFIG_SESSION} + BuiltIn.Log ${output} + : FOR ${index} IN @{NUMBERS} + \ &{mapping} BuiltIn.Create_Dictionary IP=127.0.0.${index} + \ BuiltIn.Wait_Until_Keyword_Succeeds 5x 3s TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/effective_rib_in/peer_${index} mapping=${mapping} + \ ... session=${CONFIG_SESSION} verify=True + &{mapping} BuiltIn.Create_Dictionary IP=${ODL_SYSTEM_IP} + # application peer verification + BuiltIn.Wait_Until_Keyword_Succeeds 5x 3s TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/app_peer_rib mapping=${mapping} session=${CONFIG_SESSION} + ... verify=True + +Verify_Rib_Status_Empty + [Documentation] Checks that example-ipv4-topology is ready, and therefore full rib is ready to be configured. + BuiltIn.Wait_Until_Keyword_Succeeds 60s 3s TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/topology_state session=${CONFIG_SESSION} verify=True + +Upload_Config_Files + [Documentation] Uploads exabgp config files and replaces variables within those + ... config files with desired values. + : FOR ${index} IN @{NUMBERS} + \ SSHLibrary.Put_File ${POLICIES_VAR}/exabgp_configs/exabgp${index}.cfg . + @{cfgfiles}= SSHLibrary.List_Files_In_Directory . *.cfg + : FOR ${cfgfile} IN @{cfgfiles} + \ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile} + \ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile} + \ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile} + \ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile} + \ Log ${stdout} diff --git a/csit/testplans/bgpcep-userfeatures-fluorine.txt b/csit/testplans/bgpcep-userfeatures-fluorine.txt new file mode 100644 index 0000000000..4e794a7f97 --- /dev/null +++ b/csit/testplans/bgpcep-userfeatures-fluorine.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2018 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/bgpcep/bgpfunct/050_bmp_basic.robot +integration/test/csit/suites/bgpcep/pcepuser/pcepuser.robot +integration/test/csit/suites/bgpcep/bgpfunct/bgp_functional_md5.robot +integration/test/csit/suites/bgpcep/bgpuser/basic.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.robot +integration/test/csit/suites/bgpcep/bgpfunct/010_bgp_functional_l3vpn.robot +integration/test/csit/suites/bgpcep/bgpfunct/030_bgp_functional_evpn.robot +integration/test/csit/suites/bgpcep/bgpfunct/040_bgp_functional_route_ref.robot +integration/test/csit/suites/bgpcep/bgpfunct/020_bgp_functional_multipath.robot +integration/test/csit/suites/bgpcep/bgpfunct/bgp_policies_default.robot +integration/test/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot diff --git a/csit/testplans/bgpcep-userfeatures-oxygen.txt b/csit/testplans/bgpcep-userfeatures-oxygen.txt new file mode 100644 index 0000000000..4e794a7f97 --- /dev/null +++ b/csit/testplans/bgpcep-userfeatures-oxygen.txt @@ -0,0 +1,22 @@ +# Copyright (c) 2018 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/bgpcep/bgpfunct/050_bmp_basic.robot +integration/test/csit/suites/bgpcep/pcepuser/pcepuser.robot +integration/test/csit/suites/bgpcep/bgpfunct/bgp_functional_md5.robot +integration/test/csit/suites/bgpcep/bgpuser/basic.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.robot +integration/test/csit/suites/bgpcep/bgpfunct/010_bgp_functional_l3vpn.robot +integration/test/csit/suites/bgpcep/bgpfunct/030_bgp_functional_evpn.robot +integration/test/csit/suites/bgpcep/bgpfunct/040_bgp_functional_route_ref.robot +integration/test/csit/suites/bgpcep/bgpfunct/020_bgp_functional_multipath.robot +integration/test/csit/suites/bgpcep/bgpfunct/bgp_policies_default.robot +integration/test/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot diff --git a/csit/variables/bgpfunctional/bgppolicies/app_peer/location.uri b/csit/variables/bgpfunctional/bgppolicies/app_peer/location.uri new file mode 100644 index 0000000000..2981ee4b43 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/app_peer/location.uri @@ -0,0 +1 @@ +restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/$BGP_RIB_OPENCONFIG/bgp/neighbors/ diff --git a/csit/variables/bgpfunctional/bgppolicies/app_peer/post_data.xml b/csit/variables/bgpfunctional/bgppolicies/app_peer/post_data.xml new file mode 100644 index 0000000000..3b1b32f147 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/app_peer/post_data.xml @@ -0,0 +1,6 @@ + + $IP + + application-peers + + diff --git a/csit/variables/bgpfunctional/bgppolicies/app_peer_rib/data.json b/csit/variables/bgpfunctional/bgppolicies/app_peer_rib/data.json new file mode 100644 index 0000000000..be247f1a10 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/app_peer_rib/data.json @@ -0,0 +1,22 @@ +{ + "bgp-inet:ipv4-routes": { + "ipv4-route": [ + { + "attributes": { + "as-path": {}, + "ipv4-next-hop": { + "global": "10.11.1.1" + }, + "local-pref": { + "pref": 100 + }, + "origin": { + "value": "igp" + } + }, + "path-id": 0, + "prefix": "10.0.0.17/32" + } + ] + } +} diff --git a/csit/variables/bgpfunctional/bgppolicies/app_peer_rib/location.uri b/csit/variables/bgpfunctional/bgppolicies/app_peer_rib/location.uri new file mode 100644 index 0000000000..d60fc01184 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/app_peer_rib/location.uri @@ -0,0 +1 @@ +restconf/config/bgp-rib:application-rib/$IP/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes diff --git a/csit/variables/bgpfunctional/bgppolicies/app_peer_route/location.uri b/csit/variables/bgpfunctional/bgppolicies/app_peer_route/location.uri new file mode 100644 index 0000000000..d60fc01184 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/app_peer_route/location.uri @@ -0,0 +1 @@ +restconf/config/bgp-rib:application-rib/$IP/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes diff --git a/csit/variables/bgpfunctional/bgppolicies/app_peer_route/post_data.xml b/csit/variables/bgpfunctional/bgppolicies/app_peer_route/post_data.xml new file mode 100644 index 0000000000..c978f098c9 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/app_peer_route/post_data.xml @@ -0,0 +1,16 @@ + + 0 + 10.0.0.17/32 + + + + igp + + + 100 + + + 10.11.1.1 + + + diff --git a/csit/variables/bgpfunctional/bgppolicies/ebgp_peer/data.xml b/csit/variables/bgpfunctional/bgppolicies/ebgp_peer/data.xml new file mode 100644 index 0000000000..f87ff12728 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/ebgp_peer/data.xml @@ -0,0 +1,60 @@ + + $IP + + + false + + + + + $HOLDTIME + + + + + 179 + $PASSIVE_MODE + + + + EXTERNAL + + + + x:IPV4-UNICAST + + + x:IPV6-UNICAST + + + x:IPV4-LABELLED-UNICAST + + + x:IPV6-LABELLED-UNICAST + + + x:L3VPN-IPV4-UNICAST + + + x:L3VPN-IPV6-UNICAST + + + x:L2VPN-EVPN + + + LINKSTATE + + + IPV4-FLOW + + + IPV6-FLOW + + + IPV4-L3VPN-FLOW + + + IPV6-L3VPN-FLOW + + + diff --git a/csit/variables/bgpfunctional/bgppolicies/ebgp_peer/location.uri b/csit/variables/bgpfunctional/bgppolicies/ebgp_peer/location.uri new file mode 100644 index 0000000000..d713ddf1ec --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/ebgp_peer/location.uri @@ -0,0 +1 @@ +restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/$BGP_RIB_OPENCONFIG/bgp/neighbors/neighbor/$IP diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/location.uri b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/location.uri new file mode 100644 index 0000000000..04671fb7a5 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/location.uri @@ -0,0 +1 @@ +restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F$IP/effective-rib-in diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_1/data.json b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_1/data.json new file mode 100644 index 0000000000..bf480535bc --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_1/data.json @@ -0,0 +1,32 @@ +{ + "bgp-inet:ipv4-routes": { + "ipv4-route": [ + { + "attributes": { + "as-path": {}, + "communities": [ + { + "as-number": 30741, + "semantics": 0 + }, + { + "as-number": 30741, + "semantics": 30741 + } + ], + "ipv4-next-hop": { + "global": "11.0.255.254" + }, + "local-pref": { + "pref": 100 + }, + "origin": { + "value": "igp" + } + }, + "path-id": 0, + "prefix": "1.1.1.0/24" + } + ] + } +} diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_1/location.uri b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_1/location.uri new file mode 100644 index 0000000000..16928e529f --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_1/location.uri @@ -0,0 +1 @@ +restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F$IP/effective-rib-in/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_2/data.json b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_2/data.json new file mode 100644 index 0000000000..741b5042c9 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_2/data.json @@ -0,0 +1,54 @@ +{ + "bgp-inet:ipv4-routes": { + "ipv4-route": [ + { + "attributes": { + "as-path": {}, + "ipv4-next-hop": { + "global": "12.0.255.254" + }, + "local-pref": { + "pref": 100 + }, + "origin": { + "value": "igp" + } + }, + "path-id": 0, + "prefix": "2.1.1.0/24" + }, + { + "attributes": { + "as-path": {}, + "ipv4-next-hop": { + "global": "12.1.255.254" + }, + "local-pref": { + "pref": 100 + }, + "origin": { + "value": "igp" + } + }, + "path-id": 0, + "prefix": "2.2.1.0/24" + }, + { + "attributes": { + "as-path": {}, + "ipv4-next-hop": { + "global": "12.3.255.254" + }, + "local-pref": { + "pref": 100 + }, + "origin": { + "value": "igp" + } + }, + "path-id": 0, + "prefix": "2.3.1.0/24" + } + ] + } +} diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_2/location.uri b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_2/location.uri new file mode 100644 index 0000000000..16928e529f --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_2/location.uri @@ -0,0 +1 @@ +restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F$IP/effective-rib-in/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_3/data.json b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_3/data.json new file mode 100644 index 0000000000..4ea2e36aa0 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_3/data.json @@ -0,0 +1,50 @@ +{ + "bgp-vpn-ipv4:vpn-ipv4-routes": { + "vpn-route": [ + { + "attributes": { + "as-path": { + "segments": [ + { + "as-sequence": [ + 35000, + 60000, + 64000 + ] + } + ] + }, + "communities": [ + { + "as-number": 64000, + "semantics": 43 + } + ], + "extended-communities": [ + { + "route-target-extended-community": { + "global-administrator": 24563, + "local-administrator": "ByNLLg==" + }, + "transitive": true + } + ], + "ipv4-next-hop": { + "global": "104.36.0.254" + }, + "origin": { + "value": "igp" + } + }, + "label-stack": [ + { + "label-value": 256 + } + ], + "prefix": "103.36.0.0/24", + "route-distinguisher": "0:3548:478513974", + "route-key": "WAAADdwchYs2ZyQA" + } + ] + } +} diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_3/location.uri b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_3/location.uri new file mode 100644 index 0000000000..71bbc71e96 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_3/location.uri @@ -0,0 +1 @@ +restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F$IP/effective-rib-in/tables/bgp-types:ipv4-address-family/bgp-types:mpls-labeled-vpn-subsequent-address-family/bgp-vpn-ipv4:vpn-ipv4-routes diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_4/data.json b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_4/data.json new file mode 100644 index 0000000000..5abf3e9d7b --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_4/data.json @@ -0,0 +1,29 @@ +{ + "bgp-inet:ipv4-routes": { + "ipv4-route": [ + { + "attributes": { + "as-path": {}, + "communities": [ + { + "as-number": 30740, + "semantics": 0 + }, + { + "as-number": 30740, + "semantics": 30740 + } + ], + "ipv4-next-hop": { + "global": "14.0.255.254" + }, + "origin": { + "value": "igp" + } + }, + "path-id": 0, + "prefix": "4.1.1.0/24" + } + ] + } +} diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_4/location.uri b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_4/location.uri new file mode 100644 index 0000000000..16928e529f --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_4/location.uri @@ -0,0 +1 @@ +restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F$IP/effective-rib-in/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_5/data.json b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_5/data.json new file mode 100644 index 0000000000..6c33bd3b93 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_5/data.json @@ -0,0 +1,31 @@ +{ + "bgp-inet:ipv4-routes": { + "ipv4-route": [ + { + "attributes": { + "as-path": {}, + "extended-communities": [ + { + "route-target-extended-community": { + "global-administrator": 31740, + "local-administrator": "AAB7/A==" + }, + "transitive": true + } + ], + "ipv4-next-hop": { + "global": "15.0.255.254" + }, + "local-pref": { + "pref": 100 + }, + "origin": { + "value": "igp" + } + }, + "path-id": 0, + "prefix": "5.1.1.0/24" + } + ] + } +} diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_5/location.uri b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_5/location.uri new file mode 100644 index 0000000000..16928e529f --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_5/location.uri @@ -0,0 +1 @@ +restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F$IP/effective-rib-in/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_6/data.json b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_6/data.json new file mode 100644 index 0000000000..cd048b280a --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_6/data.json @@ -0,0 +1,56 @@ +{ + "bgp-vpn-ipv6:vpn-ipv6-routes": { + "vpn-route": [ + { + "attributes": { + "as-path": { + "segments": [ + { + "as-sequence": [ + 25186, + 64512, + 65000 + ] + } + ] + }, + "communities": [ + { + "as-number": 65000, + "semantics": 33 + } + ], + "extended-communities": [ + { + "route-target-extended-community": { + "global-administrator": 10283, + "local-administrator": "BPlceA==" + }, + "transitive": true + } + ], + "ipv6-next-hop": { + "global": "::ffff" + }, + "local-pref": { + "pref": 100 + }, + "origin": { + "value": "igp" + }, + "originator-id": { + "originator": "57.35.2.240" + } + }, + "label-stack": [ + { + "label-value": 926 + } + ], + "prefix": "2001:4b50:20c0::/48", + "route-distinguisher": "0:3215:583457597", + "route-key": "cAAADI8ixts9IAFLUCDA" + } + ] + } +} diff --git a/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_6/location.uri b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_6/location.uri new file mode 100644 index 0000000000..528a0d7eb0 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/effective_rib_in/peer_6/location.uri @@ -0,0 +1 @@ +restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F$IP/effective-rib-in/tables/bgp-types:ipv6-address-family/bgp-types:mpls-labeled-vpn-subsequent-address-family/bgp-vpn-ipv6:vpn-ipv6-routes diff --git a/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp1.cfg b/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp1.cfg new file mode 100644 index 0000000000..47a12b29ef --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp1.cfg @@ -0,0 +1,22 @@ +neighbor ODLIP { + router-id 127.0.0.1; + local-address 127.0.0.1; + local-as 64496; + peer-as 64496; + + static { + route 1.1.1.1/24 { + next-hop 11.0.255.254; + community [ 30741:30741 30741:0 ]; + } + } + + capability { + route-refresh ROUTEREFRESH; + add-path ADDPATH; + } + + family { + all + } +} diff --git a/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp2.cfg b/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp2.cfg new file mode 100644 index 0000000000..df8e00aaac --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp2.cfg @@ -0,0 +1,27 @@ +neighbor ODLIP { + router-id 127.0.0.2; + local-address 127.0.0.2; + local-as 64496; + peer-as 64496; + + static { + route 2.1.1.0/24 { + next-hop 12.0.255.254; + } + route 2.2.1.0/24 { + next-hop 12.1.255.254; + } + route 2.3.1.0/24 { + next-hop 12.3.255.254; + } + } + + capability { + route-refresh ROUTEREFRESH; + add-path ADDPATH; + } + + family { + all + } +} diff --git a/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp3.cfg b/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp3.cfg new file mode 100644 index 0000000000..17f86a802f --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp3.cfg @@ -0,0 +1,28 @@ +neighbor ODLIP { + router-id 127.0.0.3; + local-address 127.0.0.3; + local-as 64496; + peer-as 64496; + + static { + route 103.36.0.5/24 { + rd 3548:478513974; + as-path [ 35000 64000 60000 ]; + next-hop 104.36.0.254; + originator-id 27.4.5.6; + local-preference 100; + community [ 64000:43 ]; + extended-community [ target:24563:7.35.75.46 ]; + label 256; + } + } + + capability { + route-refresh ROUTEREFRESH; + add-path ADDPATH; + } + + family { + all + } +} diff --git a/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp4.cfg b/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp4.cfg new file mode 100644 index 0000000000..a48f7f7789 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp4.cfg @@ -0,0 +1,22 @@ +neighbor ODLIP { + router-id 127.0.0.4; + local-address 127.0.0.4; + local-as 64496; + peer-as 64496; + + static { + route 4.1.1.0/24 { + next-hop 14.0.255.254; + community [ 30740:30740 30740:0 ]; + } + } + + capability { + route-refresh ROUTEREFRESH; + add-path ADDPATH; + } + + family { + all + } +} diff --git a/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp5.cfg b/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp5.cfg new file mode 100644 index 0000000000..4214666111 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp5.cfg @@ -0,0 +1,22 @@ +neighbor ODLIP { + router-id 127.0.0.5; + local-address 127.0.0.5; + local-as 64496; + peer-as 64496; + + static { + route 5.1.1.0/24 { + next-hop 15.0.255.254; + extended-community 31740:31740 extended-community [ 32740:32740 32740:0 ]; + } + } + + capability { + route-refresh ROUTEREFRESH; + add-path ADDPATH; + } + + family { + all + } +} diff --git a/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp6.cfg b/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp6.cfg new file mode 100644 index 0000000000..a37c0b6ba8 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/exabgp_configs/exabgp6.cfg @@ -0,0 +1,28 @@ +neighbor ODLIP { + router-id 127.0.0.6; + local-address 127.0.0.6; + local-as 64496; + peer-as 64496; + + static { + route 2001:4B50:20C0::/48 { + rd 3215:583457597; + as-path [ 25186 65000 64512 ]; + next-hop ::FFFF; + originator-id 57.35.2.240; + local-preference 100; + community [ 65000:33 ]; + extended-community [ target:10283:4.249.92.120 ]; + label 926; + } + } + + capability { + route-refresh ROUTEREFRESH; + add-path ADDPATH; + } + + family { + all + } +} diff --git a/csit/variables/bgpfunctional/bgppolicies/ibgp_peer/data.xml b/csit/variables/bgpfunctional/bgppolicies/ibgp_peer/data.xml new file mode 100644 index 0000000000..c69e0afbd6 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/ibgp_peer/data.xml @@ -0,0 +1,60 @@ + + $IP + + + false + + + + + $HOLDTIME + + + + + 179 + $PASSIVE_MODE + + + + INTERNAL + + + + x:IPV4-UNICAST + + + x:IPV6-UNICAST + + + x:IPV4-LABELLED-UNICAST + + + x:IPV6-LABELLED-UNICAST + + + x:L3VPN-IPV4-UNICAST + + + x:L3VPN-IPV6-UNICAST + + + x:L2VPN-EVPN + + + LINKSTATE + + + IPV4-FLOW + + + IPV6-FLOW + + + IPV4-L3VPN-FLOW + + + IPV6-L3VPN-FLOW + + + diff --git a/csit/variables/bgpfunctional/bgppolicies/ibgp_peer/location.uri b/csit/variables/bgpfunctional/bgppolicies/ibgp_peer/location.uri new file mode 100644 index 0000000000..d713ddf1ec --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/ibgp_peer/location.uri @@ -0,0 +1 @@ +restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/$BGP_RIB_OPENCONFIG/bgp/neighbors/neighbor/$IP diff --git a/csit/variables/bgpfunctional/bgppolicies/rib_state/location.uri b/csit/variables/bgpfunctional/bgppolicies/rib_state/location.uri new file mode 100644 index 0000000000..48fa884f3d --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/rib_state/location.uri @@ -0,0 +1 @@ +restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib diff --git a/csit/variables/bgpfunctional/bgppolicies/rr_client_peer/data.xml b/csit/variables/bgpfunctional/bgppolicies/rr_client_peer/data.xml new file mode 100644 index 0000000000..c14030d407 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/rr_client_peer/data.xml @@ -0,0 +1,60 @@ + + $IP + + + true + + + + + $HOLDTIME + + + + + 179 + $PASSIVE_MODE + + + + INTERNAL + + + + x:IPV4-UNICAST + + + x:IPV6-UNICAST + + + x:IPV4-LABELLED-UNICAST + + + x:IPV6-LABELLED-UNICAST + + + x:L3VPN-IPV4-UNICAST + + + x:L3VPN-IPV6-UNICAST + + + x:L2VPN-EVPN + + + LINKSTATE + + + IPV4-FLOW + + + IPV6-FLOW + + + IPV4-L3VPN-FLOW + + + IPV6-L3VPN-FLOW + + + diff --git a/csit/variables/bgpfunctional/bgppolicies/rr_client_peer/location.uri b/csit/variables/bgpfunctional/bgppolicies/rr_client_peer/location.uri new file mode 100644 index 0000000000..d713ddf1ec --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/rr_client_peer/location.uri @@ -0,0 +1 @@ +restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/$BGP_RIB_OPENCONFIG/bgp/neighbors/neighbor/$IP diff --git a/csit/variables/bgpfunctional/bgppolicies/topology_state/data.json b/csit/variables/bgpfunctional/bgppolicies/topology_state/data.json new file mode 100644 index 0000000000..79b8ae6198 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/topology_state/data.json @@ -0,0 +1,11 @@ +{ + "topology": [ + { + "topology-id": "example-ipv4-topology", + "server-provided": true, + "topology-types": { + "odl-bgp-topology-types:bgp-ipv4-reachability-topology": {} + } + } + ] +} diff --git a/csit/variables/bgpfunctional/bgppolicies/topology_state/location.uri b/csit/variables/bgpfunctional/bgppolicies/topology_state/location.uri new file mode 100644 index 0000000000..82e25f3d74 --- /dev/null +++ b/csit/variables/bgpfunctional/bgppolicies/topology_state/location.uri @@ -0,0 +1 @@ +/restconf/operational/network-topology:network-topology/topology/example-ipv4-topology