From f7bc99647af184810f695340248573d61a4b6e9a Mon Sep 17 00:00:00 2001 From: Peter Gubka Date: Thu, 3 Nov 2016 13:23:37 +0100 Subject: [PATCH] modifying bgp suites to use openconfig for carbon testing Change-Id: I9a0513ca49210219c6d551a91cad58faa7113c74 Signed-off-by: Peter Gubka --- .../bgpcep/bgpflowspec/010_bgp_flowspec.robot | 16 +-- .../bgpfunct/010_bgp_functional_l3vpn.robot | 21 ++-- .../020_bgp_functional_multipath.robot | 61 ++++++++--- .../bgpfunct/030_bgp_functional_evpn.robot | 25 +++-- .../040_bgp_functional_route_ref.robot | 20 ++-- .../{ => bgp_peer.beryllium}/data.xml | 2 +- .../bgp_peer.beryllium/location.uri | 1 + .../bgpflowspec/bgp_peer.boron/data.xml | 36 +++++++ .../bgpflowspec/bgp_peer.boron/location.uri | 1 + .../bgp_peer/data.xml} | 9 ++ .../bgpflowspec/bgp_peer/location.uri | 1 + csit/variables/bgpflowspec/config.uri | 1 - .../bgpfunctional/app_peer.boron/data.xml | 18 ++++ .../bgpfunctional/app_peer.boron/location.uri | 1 + .../variables/bgpfunctional/app_peer/data.xml | 24 ++--- .../bgpfunctional/app_peer/location.uri | 2 +- .../bgpfunctional/bgp_peer.boron/data.xml | 48 +++++++++ .../bgpfunctional/bgp_peer.boron/location.uri | 1 + .../variables/bgpfunctional/bgp_peer/data.xml | 81 ++++++-------- .../bgpfunctional/bgp_peer/location.uri | 2 +- .../l3vpn_ipv4/route.boron/location.uri | 1 + .../l3vpn_ipv4/route.boron/post_data.xml | 19 ++++ .../l3vpn_ipv4/route/location.uri | 2 +- .../exa-expected.json | 0 .../multipaths/bgp_peer/data.xml | 35 ++++++ .../multipaths/bgp_peer/location.uri | 1 + .../multipaths/rib.boron/data.xml | 83 ++++++++++++++ .../multipaths/rib.boron/location.uri | 1 + .../bgpfunctional/multipaths/rib/data.xml | 102 ++++-------------- .../bgpfunctional/multipaths/rib/location.uri | 2 +- .../multipaths/route/location.uri | 2 +- .../location.uri | 2 +- .../route_refresh/route/location.uri | 2 +- 33 files changed, 413 insertions(+), 210 deletions(-) rename csit/variables/bgpflowspec/{ => bgp_peer.beryllium}/data.xml (98%) create mode 100644 csit/variables/bgpflowspec/bgp_peer.beryllium/location.uri create mode 100644 csit/variables/bgpflowspec/bgp_peer.boron/data.xml create mode 100644 csit/variables/bgpflowspec/bgp_peer.boron/location.uri rename csit/variables/{bgpfunctional/openconfig_bgp_peer/post_data.xml => bgpflowspec/bgp_peer/data.xml} (70%) create mode 100644 csit/variables/bgpflowspec/bgp_peer/location.uri delete mode 100644 csit/variables/bgpflowspec/config.uri create mode 100644 csit/variables/bgpfunctional/app_peer.boron/data.xml create mode 100644 csit/variables/bgpfunctional/app_peer.boron/location.uri create mode 100644 csit/variables/bgpfunctional/bgp_peer.boron/data.xml create mode 100644 csit/variables/bgpfunctional/bgp_peer.boron/location.uri create mode 100644 csit/variables/bgpfunctional/l3vpn_ipv4/route.boron/location.uri create mode 100644 csit/variables/bgpfunctional/l3vpn_ipv4/route.boron/post_data.xml rename csit/variables/bgpfunctional/l3vpn_ipv4/{route => route_expected}/exa-expected.json (100%) create mode 100644 csit/variables/bgpfunctional/multipaths/bgp_peer/data.xml create mode 100644 csit/variables/bgpfunctional/multipaths/bgp_peer/location.uri create mode 100644 csit/variables/bgpfunctional/multipaths/rib.boron/data.xml create mode 100644 csit/variables/bgpfunctional/multipaths/rib.boron/location.uri rename csit/variables/bgpfunctional/{openconfig_bgp_peer => openconfig_peer_delete}/location.uri (64%) diff --git a/csit/suites/bgpcep/bgpflowspec/010_bgp_flowspec.robot b/csit/suites/bgpcep/bgpflowspec/010_bgp_flowspec.robot index 714d04c22b..dfe9251d78 100644 --- a/csit/suites/bgpcep/bgpflowspec/010_bgp_flowspec.robot +++ b/csit/suites/bgpcep/bgpflowspec/010_bgp_flowspec.robot @@ -15,7 +15,6 @@ Variables ${CURDIR}/../../../variables/bgpuser/variables.py ${TOOLS_S Resource ${CURDIR}/../../../libraries/ExaBgpLib.robot Resource ${CURDIR}/../../../libraries/Utils.robot Resource ${CURDIR}/../../../libraries/SetupUtils.robot -Resource ${CURDIR}/../../../libraries/ConfigViaRestconf.robot Resource ${CURDIR}/../../../libraries/CompareStream.robot Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot @@ -30,6 +29,10 @@ ${CFG2} bgp-flowspec-redirect.cfg ${EXP2} bgp-flowspec-redirect.json ${FLOWSPEC_URL} /restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-rib/tables/bgp-types:ipv4-address-family/bgp-flowspec:flowspec-subsequent-address-family/bgp-flowspec:flowspec-routes ${CONFIG_SESSION} session +${DEVICE_NAME} controller-config +${BGP_PEER_NAME} example-bgp-peer +${RIB_INSTANCE} example-bgp-rib +${PROTOCOL_OPENCONFIG} ${RIB_INSTANCE} *** Test Cases *** Check_For_Empty_Topology_Before_Talking @@ -39,8 +42,9 @@ Check_For_Empty_Topology_Before_Talking Reconfigure_ODL_To_Accept_Connection [Documentation] Configure BGP peer module with initiate-connection set to false. - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer', 'IP': '${TOOLS_SYSTEM_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}', 'INITIATE': 'false'} - ConfigViaRestconf.Put_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER} ${template_as_string} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT} + ... INITIATE=false RIB_INSTANCE_NAME=${RIB_INSTANCE} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} PASSIVE_MODE=true + TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} FlowSpec Test 1 [Documentation] Testing flowspec values for ${CFG1} @@ -56,8 +60,8 @@ FlowSpec Test 2 Deconfigure_ODL_To_Accept_Connection [Documentation] Deconfigure BGP peer. - ${template_as_string}= BuiltIn.Set_Variable {'NAME': 'example-bgp-peer', 'IP': '${TOOLS_SYSTEM_IP}', 'HOLDTIME': '${HOLDTIME}', 'PEER_PORT': '${BGP_TOOL_PORT}', 'INITIATE': 'false'} - ConfigViaRestconf.Delete_Xml_Template_Folder_Config_Via_Restconf ${BGP_VARIABLES_FOLDER} ${template_as_string} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} *** Keywords *** Start Suite @@ -72,12 +76,10 @@ Start Suite ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command sudo pip install exabgp return_stdout=True return_stderr=True ... return_rc=True RequestsLibrary.Create Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} - ConfigViaRestconf.Setup_Config_Via_Restconf Upload Config Files ${CURDIR}/../../../variables/bgpflowspec/ Stop Suite [Documentation] Suite teardown keyword - ConfigViaRestconf.Teardown_Config_Via_Restconf SSHLibrary.Close All Connections RequestsLibrary.Delete All Sessions diff --git a/csit/suites/bgpcep/bgpfunct/010_bgp_functional_l3vpn.robot b/csit/suites/bgpcep/bgpfunct/010_bgp_functional_l3vpn.robot index b536c8f337..446a8fa6fb 100644 --- a/csit/suites/bgpcep/bgpfunct/010_bgp_functional_l3vpn.robot +++ b/csit/suites/bgpcep/bgpfunct/010_bgp_functional_l3vpn.robot @@ -29,6 +29,7 @@ ${HOLDTIME} 180 ${DEVICE_NAME} controller-config ${BGP_PEER_NAME} example-bgp-peer ${RIB_INSTANCE} example-bgp-rib +${PROTOCOL_OPENCONFIG} ${RIB_INSTANCE} ${APP_PEER_NAME} example-bgp-peer-app ${BGP_VAR_FOLDER} ${CURDIR}/../../../variables/bgpfunctional ${BGP_L3VPN_DIR} ${BGP_VAR_FOLDER}/l3vpn_ipv4 @@ -39,18 +40,20 @@ ${L3VPN_RSP} ${BGP_L3VPN_DIR}/bgp-l3vpn-ipv4.json ${L3VPN_URL} /restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-rib/tables/bgp-types:ipv4-address-family/bgp-types:mpls-labeled-vpn-subsequent-address-family/bgp-vpn-ipv4:vpn-ipv4-routes ${CONFIG_SESSION} config-session ${EXARPCSCRIPT} ${CURDIR}/../../../../tools/exabgp_files/exarpc.py +${PEER_CHECK_URL} /restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F ${DEFAULT_BGPCEP_LOG_LEVEL} INFO *** Test Cases *** Configure_App_Peer - [Documentation] Configures bgp application peer - &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} RIB_INSTANCE_NAME=${RIB_INSTANCE} APP_PEER_ID=${ODL_SYSTEM_IP} + [Documentation] Configures bgp application peer. Openconfig is used for carbon and above. + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} RIB_INSTANCE_NAME=${RIB_INSTANCE} APP_PEER_ID=${ODL_SYSTEM_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + ... IP=${ODL_SYSTEM_IP} TemplatedRequests.Put_As_Xml_Templated ${BGP_VAR_FOLDER}/app_peer mapping=${mapping} session=${CONFIG_SESSION} Reconfigure_ODL_To_Accept_Connection [Documentation] Configures BGP peer module with initiate-connection set to false. &{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 RIB_INSTANCE_NAME=${RIB_INSTANCE} + ... INITIATE=false RIB_INSTANCE_NAME=${RIB_INSTANCE} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} PASSIVE_MODE=true TemplatedRequests.Put_As_Xml_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} L3vpn_Ipv4_To_Odl @@ -63,19 +66,19 @@ L3vpn_Ipv4_From_Odl [Documentation] Testing mpls vpn ipv4 routes reported from odl to exabgp [Setup] Setup_Testcase ${DEFAUTL_EXA_CFG} BgpRpcClient.exa_clean_update_message - &{mapping} BuiltIn.Create_Dictionary BGP_PEER_IP=${TOOLS_SYSTEM_IP} + &{mapping} BuiltIn.Create_Dictionary BGP_PEER_IP=${TOOLS_SYSTEM_IP} APP_PEER_IP=${ODL_SYSTEM_IP} TemplatedRequests.Post_As_Xml_Templated ${BGP_L3VPN_DIR}/route mapping=${mapping} session=${CONFIG_SESSION} - BuiltIn.Wait_Until_Keyword_Succeeds 5x 2s Verify_ExaBgp_Received_Update ${BGP_L3VPN_DIR}/route/exa-expected.json + BuiltIn.Wait_Until_Keyword_Succeeds 5x 2s Verify_ExaBgp_Received_Update ${BGP_L3VPN_DIR}/route_expected/exa-expected.json [Teardown] Teardowm_With_Remove_Route Delete_Bgp_Peer_Configuration [Documentation] Revert the BGP configuration to the original state: without any configured peers. - &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} Deconfigure_App_Peer [Documentation] Revert the BGP configuration to the original state: without application peer - &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} IP=${ODL_SYSTEM_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/app_peer mapping=${mapping} session=${CONFIG_SESSION} *** Keywords *** @@ -116,11 +119,11 @@ Setup_Testcase [Documentation] Verifies initial test condition and starts the exabgp SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing Verify_Reported_Data ${L3VPN_URL} ${L3VPN_RSPEMPTY} - ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cfg_file} ${CONFIG_SESSION} ${TOOLS_SYSTEM_IP} + ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cfg_file} ${CONFIG_SESSION} ${TOOLS_SYSTEM_IP} connection_retries=${3} Teardowm_With_Remove_Route [Documentation] Removes configured route from application peer and stops the exabgp - &{mapping} BuiltIn.Create_Dictionary + &{mapping} BuiltIn.Create_Dictionary APP_PEER_IP=${ODL_SYSTEM_IP} TemplatedRequests.Delete_Templated ${BGP_L3VPN_DIR}/route mapping=${mapping} session=${CONFIG_SESSION} Teardown_Simple diff --git a/csit/suites/bgpcep/bgpfunct/020_bgp_functional_multipath.robot b/csit/suites/bgpcep/bgpfunct/020_bgp_functional_multipath.robot index 82f1a65907..e28e952de0 100644 --- a/csit/suites/bgpcep/bgpfunct/020_bgp_functional_multipath.robot +++ b/csit/suites/bgpcep/bgpfunct/020_bgp_functional_multipath.robot @@ -23,12 +23,14 @@ Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot Library ${CURDIR}/../../../libraries/BgpRpcClient.py ${TOOLS_SYSTEM_IP} Resource ${CURDIR}/../../../libraries/BGPcliKeywords.robot Resource ${CURDIR}/../../../libraries/SSHKeywords.robot +Resource ${CURDIR}/../../../libraries/CompareStream.robot *** Variables *** ${HOLDTIME} 180 ${DEVICE_NAME} controller-config ${BGP_PEER_NAME} example-bgp-peer ${RIB_INSTANCE} example-bgp-rib +${PROTOCOL_OPENCONFIG} ${RIB_INSTANCE} ${APP_PEER_NAME} example-bgp-peer-app ${BGP_VAR_FOLDER} ${CURDIR}/../../../variables/bgpfunctional ${MULT_VAR_FOLDER} ${BGP_VAR_FOLDER}/multipaths @@ -41,6 +43,7 @@ ${N_PATHS_VALUE} 2 ${PATH_ID_LIST_LEN} 3 ${NEXT_HOP_PREF} 100.100.100. ${RIB_URI} /restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:rib-impl/example-bgp-rib +${OPENCONFIG_RIB_URI} /restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/example-bgp-rib ${NPATHS_SELM} n-paths ${ALLPATHS_SELM} all-paths ${ADDPATHCAP_SR} send\\/receive @@ -50,10 +53,11 @@ ${ADDPATHCAP_D} disable *** Test Cases *** Reconfigure_ODL_To_Accept_Connection - [Documentation] Configure BGP peer module with initiate-connection set to false. + [Documentation] Configures BGP peer module with initiate-connection set to false. &{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 RIB_INSTANCE_NAME=${RIB_INSTANCE} - TemplatedRequests.Put_As_Xml_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} + ... INITIATE=false RIB_INSTANCE_NAME=${RIB_INSTANCE} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} PASSIVE_MODE=true + # configuration of the peer and multipath for carbon and above is done in the testcase at once + CompareStream.Run_Keyword_If_At_Most_Boron TemplatedRequests.Put_As_Xml_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} Odl Allpaths Exa SendReceived [Documentation] all-paths selected policy selected @@ -61,7 +65,7 @@ Odl Allpaths Exa SendReceived [Setup] Configure_Path_Selection_And_App_Peer_And_Connect_Peer ${ALLPATHS_SELM} ${ADDPATHCAP_SR} Log_Loc_Rib_Operational BuiltIn.Wait_Until_Keyword_Succeeds 6x 2s Verify_Expected_Update_Count ${PATH_ID_LIST_LEN} - [Teardown] Remove_App_Peer_Configuration_And_Stop_ExaBgp + [Teardown] Remove_Odl_And_App_Peer_Configuration_And_Stop_ExaBgp Odl Npaths Exa SendReceived [Documentation] n-paths policy selected on odl @@ -69,12 +73,12 @@ Odl Npaths Exa SendReceived [Setup] Configure_Path_Selection_And_App_Peer_And_Connect_Peer ${NPATHS_SELM} ${ADDPATHCAP_SR} Log_Loc_Rib_Operational BuiltIn.Wait_Until_Keyword_Succeeds 6x 2s Verify_Expected_Update_Count ${N_PATHS_VALUE} - [Teardown] Remove_App_Peer_Configuration_And_Stop_ExaBgp + [Teardown] Remove_Odl_And_App_Peer_Configuration_And_Stop_ExaBgp Delete_Bgp_Peer_Configuration [Documentation] Revert the BGP configuration to the original state: without any configured peers. - &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} - TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + CompareStream.Run_Keyword_If_At_Most_Boron TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} *** Keywords *** Start_Suite @@ -87,12 +91,14 @@ Start_Suite SSHKeywords.Virtual_Env_Install_Package exabgp==3.4.16 RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} Upload_Config_Files - Configure_Odl_With_Multipaths + CompareStream.Run_Keyword_If_At_Most_Boron Configure_Odl_With_Multipaths + CompareStream.Run_Keyword_If_At_Least_Carbon Store_Rib_Configuration Stop_Suite - [Documentation] Suite teardown keyword with ord rib restoration + [Documentation] Suite teardown keyword with old rib restoration SSHKeywords.Virtual_Env_Delete - TemplatedRequests.Put_As_Xml_To_Uri ${RIB_URI} ${rib_old} session=${CONFIG_SESSION} + CompareStream.Run_Keyword_If_At_Most_Boron TemplatedRequests.Put_As_Xml_To_Uri ${RIB_URI} ${rib_old} session=${CONFIG_SESSION} + CompareStream.Run_Keyword_If_At_Least_Carbon TemplatedRequests.Put_As_Xml_To_Uri ${OPENCONFIG_RIB_URI} ${rib_old} session=${CONFIG_SESSION} SSHLibrary.Close_All_Connections RequestsLibrary.Delete_All_Sessions @@ -115,12 +121,16 @@ Configure_Path_Selection_And_App_Peer_And_Connect_Peer [Documentation] Setup test case keyword. Early after the path selection config the incomming connection ... from exabgp towards odl may be rejected by odl due to config process not finished yet. Because of that ... we try to start the tool 3 times in case early attempts fail. - Configure_Path_Selection_Mode ${odl_path_sel_mode} + SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing + CompareStream.Run_Keyword_If_At_Most_Boron Configure_Path_Selection_Mode ${odl_path_sel_mode} + CompareStream.Run_Keyword_If_At_Least_Carbon Configure_Odl_Peer_With_Path_Selection_Mode ${odl_path_sel_mode} Configure_App_Peer_With_Routes Upload_Config_Files addpath=${exa_add_path_value} ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${DEFAUTL_RPC_CFG} ${CONFIG_SESSION} ${TOOLS_SYSTEM_IP} connection_retries=${3} -Remove_App_Peer_Configuration_And_Stop_ExaBgp +Remove_Odl_And_App_Peer_Configuration_And_Stop_ExaBgp + &{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + CompareStream.Run_Keyword_If_At_Least_Carbon TemplatedRequests.Delete_Templated ${MULT_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} Deconfigure_App_Peer ExaBgpLib.Stop_ExaBgp SetupUtils.Teardown_Test_Show_Bugs_If_Test_Failed @@ -138,6 +148,15 @@ Configure_Path_Selection_Mode TemplatedRequests.Get_As_Xml_Templated ${MULT_VAR_FOLDER}/rib mapping=${mapping} session=${CONFIG_SESSION} TemplatedRequests.Put_As_Xml_Templated ${MULT_VAR_FOLDER}/module_psm mapping=${mapping} session=${CONFIG_SESSION} +Configure_Odl_Peer_With_Path_Selection_Mode + [Arguments] ${psm} + [Documentation] Configures odl peer with path selection mode + ${npaths}= BuiltIn.Set_Variable_If "${psm}"=="${ALLPATHS_SELM}" 0 ${N_PATHS_VALUE} + &{mapping} BuiltIn.Create_Dictionary IP=${TOOLS_SYSTEM_IP} HOLDTIME=${HOLDTIME} PEER_PORT=${BGP_TOOL_PORT} PASSIVE_MODE=true MULTIPATH=${npaths} + ... BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + TemplatedRequests.Put_As_Xml_Templated ${MULT_VAR_FOLDER}/rib mapping=${mapping} session=${CONFIG_SESSION} + TemplatedRequests.Put_As_Xml_Templated ${MULT_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} + Configure_Odl_With_Multipaths [Documentation] Configures odl to support n-paths or all-paths selection ${mapping}= BuiltIn.Set Variable ${DEFAULT_MAPPING} @@ -146,9 +165,14 @@ Configure_Odl_With_Multipaths TemplatedRequests.Put_As_Xml_Templated ${MULT_VAR_FOLDER}/service_psmf mapping=${mapping} session=${CONFIG_SESSION} Configure_Path_Selection_Mode n-paths TemplatedRequests.Put_As_Xml_Templated ${MULT_VAR_FOLDER}/service_bpsm mapping=${mapping} session=${CONFIG_SESSION} + Store_Rib_Configuration + TemplatedRequests.Put_As_Xml_Templated ${MULT_VAR_FOLDER}/rib mapping=${mapping} session=${CONFIG_SESSION} + +Store_Rib_Configuration + [Documentation] Stores rib configuration + ${mapping}= BuiltIn.Set Variable ${DEFAULT_MAPPING} ${rib_old}= TemplatedRequests.Get_As_Xml_Templated ${MULT_VAR_FOLDER}/rib mapping=${mapping} session=${CONFIG_SESSION} BuiltIn.Set_Suite_Variable ${rib_old} - TemplatedRequests.Put_As_Xml_Templated ${MULT_VAR_FOLDER}/rib mapping=${mapping} session=${CONFIG_SESSION} Log_Loc_Rib_Operational ${rsp}= RequestsLibrary.Get Request ${CONFIG_SESSION} /restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-rib/ @@ -156,15 +180,18 @@ Log_Loc_Rib_Operational Configure_App_Peer_With_Routes [Documentation] Configure bgp application peer and fill it immediately with routes. - &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} RIB_INSTANCE_NAME=${RIB_INSTANCE} APP_PEER_ID=${ODL_SYSTEM_IP} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} RIB_INSTANCE_NAME=${RIB_INSTANCE} APP_PEER_ID=${ODL_SYSTEM_IP} IP=${ODL_SYSTEM_IP} + ... BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} TemplatedRequests.Put_As_Xml_Templated ${BGP_VAR_FOLDER}/app_peer mapping=${mapping} session=${CONFIG_SESSION} + ${app_rib} CompareStream.Set_Variable_If_At_Most_Boron example-app-rib ${ODL_SYSTEM_IP} : FOR ${pathid} IN @{PATH_ID_LIST} - \ &{route_mapping} BuiltIn.Create_Dictionary NEXTHOP=${NEXT_HOP_PREF}${pathid} LOCALPREF=${pathid}00 PATHID=${pathid} + \ &{route_mapping} BuiltIn.Create_Dictionary NEXTHOP=${NEXT_HOP_PREF}${pathid} LOCALPREF=${pathid}00 PATHID=${pathid} APP_RIB=${app_rib} \ TemplatedRequests.Post_As_Xml_Templated ${MULT_VAR_FOLDER}/route mapping=${route_mapping} session=${CONFIG_SESSION} Deconfigure_App_Peer [Documentation] Revert the BGP configuration to the original state: without application peer - &{route_mapping} BuiltIn.Create_Dictionary + ${app_rib} CompareStream.Set_Variable_If_At_Most_Boron example-app-rib ${ODL_SYSTEM_IP} + &{route_mapping} BuiltIn.Create_Dictionary APP_RIB=${app_rib} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} TemplatedRequests.Delete_Templated ${MULT_VAR_FOLDER}/route mapping=${route_mapping} session=${CONFIG_SESSION} - &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} IP=${ODL_SYSTEM_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/app_peer mapping=${mapping} session=${CONFIG_SESSION} diff --git a/csit/suites/bgpcep/bgpfunct/030_bgp_functional_evpn.robot b/csit/suites/bgpcep/bgpfunct/030_bgp_functional_evpn.robot index f6dc48f23b..4a0e16407e 100644 --- a/csit/suites/bgpcep/bgpfunct/030_bgp_functional_evpn.robot +++ b/csit/suites/bgpcep/bgpfunct/030_bgp_functional_evpn.robot @@ -32,6 +32,7 @@ ${HOLDTIME} 180 ${DEVICE_NAME} controller-config ${BGP_PEER_NAME} example-bgp-peer ${RIB_INSTANCE} example-bgp-rib +${PROTOCOL_OPENCONFIG} ${RIB_INSTANCE} ${APP_PEER_NAME} example-bgp-peer-app ${BGP_VARIABLES_FOLDER} ${CURDIR}/../../../variables/bgpfunctional ${DEFAUTL_RPC_CFG} exa.cfg @@ -39,22 +40,20 @@ ${CONFIG_SESSION} config-session ${EVPN_VARIABLES_DIR} ${CURDIR}/../../../variables/bgpfunctional/l2vpn_evpn ${BGP_TOOL_LOG_LEVEL} debug ${PLAY_SCRIPT} ${CURDIR}/../../../../tools/fastbgp/play.py -${EVPN_CONF_URL} /restconf/config/bgp-rib:application-rib/example-app-rib/tables/odl-bgp-evpn:l2vpn-address-family/odl-bgp-evpn:evpn-subsequent-address-family/odl-bgp-evpn:evpn-routes/ -${EVPN_RIB_OPER_URL} /restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-rib/tables/odl-bgp-evpn:l2vpn-address-family/odl-bgp-evpn:evpn-subsequent-address-family/odl-bgp-evpn:evpn-routes -${LOC_RIB_URL} /restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/loc-rib/tables/odl-bgp-evpn:l2vpn-address-family/odl-bgp-evpn:evpn-subsequent-address-family/odl-bgp-evpn:evpn-routes *** Test Cases *** Configure_App_Peer - [Documentation] Configures bgp application peer + [Documentation] Configures bgp application peer. Openconfig is used for carbon and above. [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing - &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} RIB_INSTANCE_NAME=${RIB_INSTANCE} APP_PEER_ID=${ODL_SYSTEM_IP} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} RIB_INSTANCE_NAME=${RIB_INSTANCE} APP_PEER_ID=${ODL_SYSTEM_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + ... IP=${ODL_SYSTEM_IP} TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}/app_peer mapping=${mapping} session=${CONFIG_SESSION} Reconfigure_ODL_To_Accept_Connection [Documentation] Configures 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 RIB_INSTANCE_NAME=${RIB_INSTANCE} + ... INITIATE=false RIB_INSTANCE_NAME=${RIB_INSTANCE} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} PASSIVE_MODE=true TemplatedRequests.Put_As_Xml_Templated ${BGP_VARIABLES_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} Start_Bgp_Peer @@ -302,13 +301,13 @@ Kill_Talking_BGP_Speaker 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} Create Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} Deconfigure_App_Peer [Documentation] Revert the BGP configuration to the original state: without application peer [Setup] SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing - &{mapping} Create Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} IP=${ODL_SYSTEM_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} TemplatedRequests.Delete_Templated ${BGP_VARIABLES_FOLDER}/app_peer mapping=${mapping} session=${CONFIG_SESSION} *** Keywords *** @@ -321,6 +320,10 @@ Start_Suite RequestsLibrary.Create Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} SSHLibrary.Put File ${PLAY_SCRIPT} . SSHKeywords.Assure_Library_Ipaddr target_dir=. + ${app_rib}= CompareStream.Set_Variable_If_At_Most_Boron example-app-rib ${ODL_SYSTEM_IP} + ${bgp_rib}= CompareStream.Set_Variable_If_At_Most_Boron example-bgp-rib example-bgp-rib + BuiltIn.Set_Suite_Variable ${EVPN_CONF_URL} /restconf/config/bgp-rib:application-rib/${app_rib}/tables/odl-bgp-evpn:l2vpn-address-family/odl-bgp-evpn:evpn-subsequent-address-family/odl-bgp-evpn:evpn-routes/ + BuiltIn.Set_Suite_Variable ${EVPN_LOC_RIB_OPER_URL} /restconf/operational/bgp-rib:bgp-rib/rib/${bgp_rib}/loc-rib/tables/odl-bgp-evpn:l2vpn-address-family/odl-bgp-evpn:evpn-subsequent-address-family/odl-bgp-evpn:evpn-routes Stop_Suite [Documentation] Suite teardown keyword @@ -386,7 +389,7 @@ Verify_Test_Preconditions Remove_Configured_Routes [Documentation] Removes the route if present. First GET is for debug purposes. - ${rsp}= RequestsLibrary.Get_Request ${CONFIG_SESSION} ${LOC_RIB_URL} headers=${HEADERS} + ${rsp}= RequestsLibrary.Get_Request ${CONFIG_SESSION} ${EVPN_LOC_RIB_OPER_URL} headers=${HEADERS} Log ${rsp.content} ${rsp}= RequestsLibrary.Get_Request ${CONFIG_SESSION} ${EVPN_CONF_URL} headers=${HEADERS} Log ${rsp.content} @@ -402,7 +405,7 @@ Withdraw_Route_And_Verify Get_Update_Content [Documentation] Gets received data from odl's peer - ${resp}= RequestsLibrary.Get_Request ${CONFIG_SESSION} ${EVPN_RIB_OPER_URL} headers=${HEADERS_XML} + ${resp}= RequestsLibrary.Get_Request ${CONFIG_SESSION} ${EVPN_LOC_RIB_OPER_URL} headers=${HEADERS_XML} BuiltIn.Log ${resp.content} ${update}= BgpRpcClient.play_get BuiltIn.Should_Not_Be_Equal ${update} ${Empty} @@ -411,5 +414,5 @@ Get_Update_Content Loc_Rib_Presnece [Arguments] ${exp_content} [Documentation] Verifies if loc-rib contains expected data - ${rsp}= RequestsLibrary.Get_Request ${CONFIG_SESSION} ${LOC_RIB_URL} headers=${HEADERS} + ${rsp}= RequestsLibrary.Get_Request ${CONFIG_SESSION} ${EVPN_LOC_RIB_OPER_URL} headers=${HEADERS} TemplatedRequests.Normalize_Jsons_And_Compare ${exp_content} ${rsp.content} diff --git a/csit/suites/bgpcep/bgpfunct/040_bgp_functional_route_ref.robot b/csit/suites/bgpcep/bgpfunct/040_bgp_functional_route_ref.robot index ba421d7bb7..dfd57dbbd1 100644 --- a/csit/suites/bgpcep/bgpfunct/040_bgp_functional_route_ref.robot +++ b/csit/suites/bgpcep/bgpfunct/040_bgp_functional_route_ref.robot @@ -32,6 +32,7 @@ ${HOLDTIME} 180 ${DEVICE_NAME} controller-config ${BGP_PEER_NAME} example-bgp-peer ${RIB_INSTANCE} example-bgp-rib +${PROTOCOL_OPENCONFIG} ${RIB_INSTANCE} ${APP_PEER_NAME} example-bgp-peer-app ${BGP_VAR_FOLDER} ${CURDIR}/../../../variables/bgpfunctional ${BGP_RR_VAR_FOLDER} ${BGP_VAR_FOLDER}/route_refresh @@ -42,14 +43,15 @@ ${JOLOKURL} /jolokia/read/org.opendaylight.controller:instanceName=${BGP_P *** Test Cases *** Configure_App_Peer - [Documentation] Configure bgp application peer - &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} RIB_INSTANCE_NAME=${RIB_INSTANCE} APP_PEER_ID=${ODL_SYSTEM_IP} + [Documentation] Configures bgp application peer. Openconfig is used for carbon and above. + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} RIB_INSTANCE_NAME=${RIB_INSTANCE} APP_PEER_ID=${ODL_SYSTEM_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} + ... IP=${ODL_SYSTEM_IP} TemplatedRequests.Put_As_Xml_Templated ${BGP_VAR_FOLDER}/app_peer mapping=${mapping} session=${CONFIG_SESSION} Reconfigure_ODL_To_Accept_Connection - [Documentation] Configure BGP peer module with initiate-connection set to false. + [Documentation] Configures BGP peer module with initiate-connection set to false. &{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 RIB_INSTANCE_NAME=${RIB_INSTANCE} + ... INITIATE=false RIB_INSTANCE_NAME=${RIB_INSTANCE} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} PASSIVE_MODE=true TemplatedRequests.Put_As_Xml_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} Exa_To_Send_Route_Request @@ -73,12 +75,12 @@ Odl_To_Send_Route_Request Delete_Bgp_Peer_Configuration [Documentation] Revert the BGP configuration to the original state: without any configured peers. - &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} BGP_NAME=${BGP_PEER_NAME} IP=${TOOLS_SYSTEM_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/bgp_peer mapping=${mapping} session=${CONFIG_SESSION} Deconfigure_App_Peer [Documentation] Revert the BGP configuration to the original state: without application peer - &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} + &{mapping} BuiltIn.Create_Dictionary DEVICE_NAME=${DEVICE_NAME} APP_PEER_NAME=${APP_PEER_NAME} IP=${ODL_SYSTEM_IP} BGP_RIB_OPENCONFIG=${PROTOCOL_OPENCONFIG} TemplatedRequests.Delete_Templated ${BGP_VAR_FOLDER}/app_peer mapping=${mapping} session=${CONFIG_SESSION} *** Keywords *** @@ -115,8 +117,9 @@ Upload_Config_Files Configure_Routes_And_Start_ExaBgp [Arguments] ${cfg_file} [Documentation] Setup keyword for exa to odl test case + ${app_rib} CompareStream.Set_Variable_If_At_Most_Boron example-app-rib ${ODL_SYSTEM_IP} : FOR ${prefix} IN 1.1.1.1/32 2.2.2.2/32 - \ &{mapping} BuiltIn.Create_Dictionary PREFIX=${prefix} + \ &{mapping} BuiltIn.Create_Dictionary PREFIX=${prefix} APP_RIB=${app_rib} \ TemplatedRequests.Post_As_Xml_Templated ${BGP_RR_VAR_FOLDER}/route mapping=${mapping} session=${CONFIG_SESSION} BuiltIn.Set_Suite_Variable ${nr_configured_routes} 2 ExaBgpLib.Start_ExaBgp_And_Verify_Connected ${cfg_file} ${CONFIG_SESSION} ${TOOLS_SYSTEM_IP} @@ -125,7 +128,8 @@ Configure_Routes_And_Start_ExaBgp Deconfigure_Routes_And_Stop_ExaBgp [Documentation] Teardown keyword for exa to odl test case ExaBgpLib.Stop_ExaBgp - &{mapping} BuiltIn.Create_Dictionary PREFIX=${prefix} + ${app_rib} CompareStream.Set_Variable_If_At_Most_Boron example-app-rib ${ODL_SYSTEM_IP} + &{mapping} BuiltIn.Create_Dictionary PREFIX=${prefix} APP_RIB=${app_rib} TemplatedRequests.Delete_Templated ${BGP_RR_VAR_FOLDER}/route mapping=${mapping} session=${CONFIG_SESSION} Verify_Odl_Sent_Route_Request diff --git a/csit/variables/bgpflowspec/data.xml b/csit/variables/bgpflowspec/bgp_peer.beryllium/data.xml similarity index 98% rename from csit/variables/bgpflowspec/data.xml rename to csit/variables/bgpflowspec/bgp_peer.beryllium/data.xml index 61c962542f..eae2045fdd 100644 --- a/csit/variables/bgpflowspec/data.xml +++ b/csit/variables/bgpflowspec/bgp_peer.beryllium/data.xml @@ -7,7 +7,7 @@ $INITIATE prefix:rib-instance - example-bgp-rib + $RIB_INSTANCE_NAME prefix:bgp-peer-registry diff --git a/csit/variables/bgpflowspec/bgp_peer.beryllium/location.uri b/csit/variables/bgpflowspec/bgp_peer.beryllium/location.uri new file mode 100644 index 0000000000..b367efd4e2 --- /dev/null +++ b/csit/variables/bgpflowspec/bgp_peer.beryllium/location.uri @@ -0,0 +1 @@ +restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/$NAME diff --git a/csit/variables/bgpflowspec/bgp_peer.boron/data.xml b/csit/variables/bgpflowspec/bgp_peer.boron/data.xml new file mode 100644 index 0000000000..eae2045fdd --- /dev/null +++ b/csit/variables/bgpflowspec/bgp_peer.boron/data.xml @@ -0,0 +1,36 @@ + + prefix:bgp-peer + $NAME + $IP + $PEER_PORT + $HOLDTIME + $INITIATE + + prefix:rib-instance + $RIB_INSTANCE_NAME + + + prefix:bgp-peer-registry + global-bgp-peer-registry + + + prefix:bgp-table-type + ipv4-unicast + + + prefix:bgp-table-type + ipv6-unicast + + + prefix:bgp-table-type + linkstate + + + prefix:bgp-table-type + ipv4-flowspec + + + prefix:bgp-table-type + ipv6-flowspec + + diff --git a/csit/variables/bgpflowspec/bgp_peer.boron/location.uri b/csit/variables/bgpflowspec/bgp_peer.boron/location.uri new file mode 100644 index 0000000000..b367efd4e2 --- /dev/null +++ b/csit/variables/bgpflowspec/bgp_peer.boron/location.uri @@ -0,0 +1 @@ +restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/$NAME diff --git a/csit/variables/bgpfunctional/openconfig_bgp_peer/post_data.xml b/csit/variables/bgpflowspec/bgp_peer/data.xml similarity index 70% rename from csit/variables/bgpfunctional/openconfig_bgp_peer/post_data.xml rename to csit/variables/bgpflowspec/bgp_peer/data.xml index 7168db264d..8371b8edba 100644 --- a/csit/variables/bgpfunctional/openconfig_bgp_peer/post_data.xml +++ b/csit/variables/bgpflowspec/bgp_peer/data.xml @@ -23,5 +23,14 @@ x:IPV4-UNICAST + + x:L3VPN-IPV4-UNICAST + + + IPV4-FLOW + + + IPV6-FLOW + diff --git a/csit/variables/bgpflowspec/bgp_peer/location.uri b/csit/variables/bgpflowspec/bgp_peer/location.uri new file mode 100644 index 0000000000..d713ddf1ec --- /dev/null +++ b/csit/variables/bgpflowspec/bgp_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/bgpflowspec/config.uri b/csit/variables/bgpflowspec/config.uri deleted file mode 100644 index 383950a4f1..0000000000 --- a/csit/variables/bgpflowspec/config.uri +++ /dev/null @@ -1 +0,0 @@ -config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/$NAME diff --git a/csit/variables/bgpfunctional/app_peer.boron/data.xml b/csit/variables/bgpfunctional/app_peer.boron/data.xml new file mode 100644 index 0000000000..ea547c0662 --- /dev/null +++ b/csit/variables/bgpfunctional/app_peer.boron/data.xml @@ -0,0 +1,18 @@ + + x:bgp-application-peer + $APP_PEER_NAME + $APP_PEER_ID + + x:rib-instance + $RIB_INSTANCE_NAME + + example-app-rib + + x:dom-async-data-broker + pingpong-broker + + + prefix:bgp-peer-registry + global-bgp-peer-registry + + diff --git a/csit/variables/bgpfunctional/app_peer.boron/location.uri b/csit/variables/bgpfunctional/app_peer.boron/location.uri new file mode 100644 index 0000000000..19e585f7a6 --- /dev/null +++ b/csit/variables/bgpfunctional/app_peer.boron/location.uri @@ -0,0 +1 @@ +restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:bgp-application-peer/$APP_PEER_NAME diff --git a/csit/variables/bgpfunctional/app_peer/data.xml b/csit/variables/bgpfunctional/app_peer/data.xml index 8e8ea290a9..3b1b32f147 100644 --- a/csit/variables/bgpfunctional/app_peer/data.xml +++ b/csit/variables/bgpfunctional/app_peer/data.xml @@ -1,18 +1,6 @@ - - x:bgp-application-peer - $APP_PEER_NAME - $APP_PEER_ID - - x:rib-instance - $RIB_INSTANCE_NAME - - example-app-rib - - x:dom-async-data-broker - pingpong-broker - - - prefix:bgp-peer-registry - global-bgp-peer-registry - - + + $IP + + application-peers + + diff --git a/csit/variables/bgpfunctional/app_peer/location.uri b/csit/variables/bgpfunctional/app_peer/location.uri index 19e585f7a6..d713ddf1ec 100644 --- a/csit/variables/bgpfunctional/app_peer/location.uri +++ b/csit/variables/bgpfunctional/app_peer/location.uri @@ -1 +1 @@ -restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:bgp-application-peer/$APP_PEER_NAME +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/bgp_peer.boron/data.xml b/csit/variables/bgpfunctional/bgp_peer.boron/data.xml new file mode 100644 index 0000000000..35dd1478d6 --- /dev/null +++ b/csit/variables/bgpfunctional/bgp_peer.boron/data.xml @@ -0,0 +1,48 @@ + + prefix:bgp-peer + $BGP_NAME + $IP + $PEER_PORT + $HOLDTIME + $INITIATE + + prefix:rib-instance + $RIB_INSTANCE_NAME + + + prefix:bgp-peer-registry + global-bgp-peer-registry + + + binding:binding-rpc-registry + binding-rpc-broker + + + prefix:bgp-table-type + ipv4-unicast + + + prefix:bgp-table-type + ipv6-unicast + + + prefix:bgp-table-type + linkstate + + + prefix:bgp-table-type + ipv4-l3vpn + + + prefix:bgp-table-type + evpn + + + prefix:add-path + ipv4-unicast-both + + + prefix:add-path + ipv6-unicast-both + + diff --git a/csit/variables/bgpfunctional/bgp_peer.boron/location.uri b/csit/variables/bgpfunctional/bgp_peer.boron/location.uri new file mode 100644 index 0000000000..b88d6eb86c --- /dev/null +++ b/csit/variables/bgpfunctional/bgp_peer.boron/location.uri @@ -0,0 +1 @@ +restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/$BGP_NAME diff --git a/csit/variables/bgpfunctional/bgp_peer/data.xml b/csit/variables/bgpfunctional/bgp_peer/data.xml index 35dd1478d6..a0e6362c0e 100644 --- a/csit/variables/bgpfunctional/bgp_peer/data.xml +++ b/csit/variables/bgpfunctional/bgp_peer/data.xml @@ -1,48 +1,33 @@ - - prefix:bgp-peer - $BGP_NAME - $IP - $PEER_PORT - $HOLDTIME - $INITIATE - - prefix:rib-instance - $RIB_INSTANCE_NAME - - - prefix:bgp-peer-registry - global-bgp-peer-registry - - - binding:binding-rpc-registry - binding-rpc-broker - - - prefix:bgp-table-type - ipv4-unicast - - - prefix:bgp-table-type - ipv6-unicast - - - prefix:bgp-table-type - linkstate - - - prefix:bgp-table-type - ipv4-l3vpn - - - prefix:bgp-table-type - evpn - - - prefix:add-path - ipv4-unicast-both - - - prefix:add-path - ipv6-unicast-both - - + + $IP + + + false + + + + + $HOLDTIME + + + + + $PEER_PORT + $PASSIVE_MODE + + + + INTERNAL + + + + x:IPV4-UNICAST + + + x:L3VPN-IPV4-UNICAST + + + x:L2VPN-EVPN + + + diff --git a/csit/variables/bgpfunctional/bgp_peer/location.uri b/csit/variables/bgpfunctional/bgp_peer/location.uri index b88d6eb86c..d713ddf1ec 100644 --- a/csit/variables/bgpfunctional/bgp_peer/location.uri +++ b/csit/variables/bgpfunctional/bgp_peer/location.uri @@ -1 +1 @@ -restconf/config/network-topology:network-topology/topology/topology-netconf/node/$DEVICE_NAME/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/$BGP_NAME +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/l3vpn_ipv4/route.boron/location.uri b/csit/variables/bgpfunctional/l3vpn_ipv4/route.boron/location.uri new file mode 100644 index 0000000000..8b4132299a --- /dev/null +++ b/csit/variables/bgpfunctional/l3vpn_ipv4/route.boron/location.uri @@ -0,0 +1 @@ +/restconf/config/bgp-rib:application-rib/example-app-rib/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/l3vpn_ipv4/route.boron/post_data.xml b/csit/variables/bgpfunctional/l3vpn_ipv4/route.boron/post_data.xml new file mode 100644 index 0000000000..7abd5e9bf8 --- /dev/null +++ b/csit/variables/bgpfunctional/l3vpn_ipv4/route.boron/post_data.xml @@ -0,0 +1,19 @@ + + vpn1 + + 123 + + 429496729:1 + 2.2.2.2/32 + + + 199.20.166.41 + + + igp + + + 100 + + + diff --git a/csit/variables/bgpfunctional/l3vpn_ipv4/route/location.uri b/csit/variables/bgpfunctional/l3vpn_ipv4/route/location.uri index 8b4132299a..5308660dd2 100644 --- a/csit/variables/bgpfunctional/l3vpn_ipv4/route/location.uri +++ b/csit/variables/bgpfunctional/l3vpn_ipv4/route/location.uri @@ -1 +1 @@ -/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv4-address-family/bgp-types:mpls-labeled-vpn-subsequent-address-family/bgp-vpn-ipv4:vpn-ipv4-routes/ +/restconf/config/bgp-rib:application-rib/$APP_PEER_IP/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/l3vpn_ipv4/route/exa-expected.json b/csit/variables/bgpfunctional/l3vpn_ipv4/route_expected/exa-expected.json similarity index 100% rename from csit/variables/bgpfunctional/l3vpn_ipv4/route/exa-expected.json rename to csit/variables/bgpfunctional/l3vpn_ipv4/route_expected/exa-expected.json diff --git a/csit/variables/bgpfunctional/multipaths/bgp_peer/data.xml b/csit/variables/bgpfunctional/multipaths/bgp_peer/data.xml new file mode 100644 index 0000000000..7920862fe9 --- /dev/null +++ b/csit/variables/bgpfunctional/multipaths/bgp_peer/data.xml @@ -0,0 +1,35 @@ + + $IP + + + false + + + + + $HOLDTIME + + + + + $PEER_PORT + $PASSIVE_MODE + + + + INTERNAL + + + + x:IPV4-UNICAST + true + $MULTIPATH + + + x:L3VPN-IPV4-UNICAST + + + x:L2VPN-EVPN + + + diff --git a/csit/variables/bgpfunctional/multipaths/bgp_peer/location.uri b/csit/variables/bgpfunctional/multipaths/bgp_peer/location.uri new file mode 100644 index 0000000000..d713ddf1ec --- /dev/null +++ b/csit/variables/bgpfunctional/multipaths/bgp_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/multipaths/rib.boron/data.xml b/csit/variables/bgpfunctional/multipaths/rib.boron/data.xml new file mode 100644 index 0000000000..ccc0850460 --- /dev/null +++ b/csit/variables/bgpfunctional/multipaths/rib.boron/data.xml @@ -0,0 +1,83 @@ + + x:rib-impl + example-bgp-rib + 64496 + + pingpong-broker + x:dom-async-data-broker + + 192.0.2.2 + + global-bgp-dispatcher + bgp-dispatcher + + + pingpong-binding-data-broker + x:binding-async-data-broker + + + + global-rib-extensions + x:extensions + + + ipv4-unicast + bgp-table-type + + + ipv6-unicast + bgp-table-type + + + linkstate + bgp-table-type + + + ipv4-flowspec + bgp-table-type + + + ipv6-flowspec + bgp-table-type + + + ipv4-flowspec-l3vpn + bgp-table-type + + + ipv6-flowspec-l3vpn + bgp-table-type + + + ipv4-labeled-unicast + bgp-table-type + + + ipv6-labeled-unicast + bgp-table-type + + + ipv4-l3vpn + bgp-table-type + + + ipv6-l3vpn + bgp-table-type + + + evpn + bgp-table-type + + example-bgp-rib + + runtime-mapping-singleton + x:binding-codec-tree-factory + + + ipv4-unicast-path-selection-mode + bgp-path-selection-mode + + diff --git a/csit/variables/bgpfunctional/multipaths/rib.boron/location.uri b/csit/variables/bgpfunctional/multipaths/rib.boron/location.uri new file mode 100644 index 0000000000..2f612b5bb9 --- /dev/null +++ b/csit/variables/bgpfunctional/multipaths/rib.boron/location.uri @@ -0,0 +1 @@ +/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:rib-impl/example-bgp-rib diff --git a/csit/variables/bgpfunctional/multipaths/rib/data.xml b/csit/variables/bgpfunctional/multipaths/rib/data.xml index ccc0850460..005c0b4ba4 100644 --- a/csit/variables/bgpfunctional/multipaths/rib/data.xml +++ b/csit/variables/bgpfunctional/multipaths/rib/data.xml @@ -1,83 +1,19 @@ - - x:rib-impl - example-bgp-rib - 64496 - - pingpong-broker - x:dom-async-data-broker - - 192.0.2.2 - - global-bgp-dispatcher - bgp-dispatcher - - - pingpong-binding-data-broker - x:binding-async-data-broker - - - - global-rib-extensions - x:extensions - - - ipv4-unicast - bgp-table-type - - - ipv6-unicast - bgp-table-type - - - linkstate - bgp-table-type - - - ipv4-flowspec - bgp-table-type - - - ipv6-flowspec - bgp-table-type - - - ipv4-flowspec-l3vpn - bgp-table-type - - - ipv6-flowspec-l3vpn - bgp-table-type - - - ipv4-labeled-unicast - bgp-table-type - - - ipv6-labeled-unicast - bgp-table-type - - - ipv4-l3vpn - bgp-table-type - - - ipv6-l3vpn - bgp-table-type - - - evpn - bgp-table-type - - example-bgp-rib - - runtime-mapping-singleton - x:binding-codec-tree-factory - - - ipv4-unicast-path-selection-mode - bgp-path-selection-mode - - + + example-bgp-rib + x:BGP + + + + 192.0.2.2 + 64496 + + + + x:IPV4-UNICAST + true + $MULTIPATH + + + + + diff --git a/csit/variables/bgpfunctional/multipaths/rib/location.uri b/csit/variables/bgpfunctional/multipaths/rib/location.uri index 2f612b5bb9..e44e67057d 100644 --- a/csit/variables/bgpfunctional/multipaths/rib/location.uri +++ b/csit/variables/bgpfunctional/multipaths/rib/location.uri @@ -1 +1 @@ -/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:rib-impl/example-bgp-rib +/restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/example-bgp-rib diff --git a/csit/variables/bgpfunctional/multipaths/route/location.uri b/csit/variables/bgpfunctional/multipaths/route/location.uri index 8dad9e51cd..778b65c69c 100644 --- a/csit/variables/bgpfunctional/multipaths/route/location.uri +++ b/csit/variables/bgpfunctional/multipaths/route/location.uri @@ -1 +1 @@ -/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ +/restconf/config/bgp-rib:application-rib/$APP_RIB/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ diff --git a/csit/variables/bgpfunctional/openconfig_bgp_peer/location.uri b/csit/variables/bgpfunctional/openconfig_peer_delete/location.uri similarity index 64% rename from csit/variables/bgpfunctional/openconfig_bgp_peer/location.uri rename to csit/variables/bgpfunctional/openconfig_peer_delete/location.uri index d2c8d41d05..12be97a98a 100644 --- a/csit/variables/bgpfunctional/openconfig_bgp_peer/location.uri +++ b/csit/variables/bgpfunctional/openconfig_peer_delete/location.uri @@ -1 +1 @@ -restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/$BGP_RIB/bgp/neighbors +restconf/config/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/$BGP_RIB/bgp/neighbors/neighbors diff --git a/csit/variables/bgpfunctional/route_refresh/route/location.uri b/csit/variables/bgpfunctional/route_refresh/route/location.uri index 8dad9e51cd..778b65c69c 100644 --- a/csit/variables/bgpfunctional/route_refresh/route/location.uri +++ b/csit/variables/bgpfunctional/route_refresh/route/location.uri @@ -1 +1 @@ -/restconf/config/bgp-rib:application-rib/example-app-rib/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ +/restconf/config/bgp-rib:application-rib/$APP_RIB/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes/ -- 2.36.6