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
${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
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}
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
${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
${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
${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
[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 ***
[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
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
${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
*** 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
[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
[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
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
[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
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}
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/
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}
${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
${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
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 ***
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
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}
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}
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}
${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
*** 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
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 ***
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}
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
<initiate-connection xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$INITIATE</initiate-connection>
<rib xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:rib-instance</type>
- <name>example-bgp-rib</name>
+ <name>$RIB_INSTANCE_NAME</name>
</rib>
<peer-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-registry</type>
--- /dev/null
+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
--- /dev/null
+<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer</type>
+ <name>$NAME</name>
+ <host xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$IP</host>
+ <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$PEER_PORT</port>
+ <holdtimer xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$HOLDTIME</holdtimer>
+ <initiate-connection xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$INITIATE</initiate-connection>
+ <rib xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:rib-instance</type>
+ <name>$RIB_INSTANCE_NAME</name>
+ </rib>
+ <peer-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-registry</type>
+ <name>global-bgp-peer-registry</name>
+ </peer-registry>
+ <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
+ <name>ipv4-unicast</name>
+ </advertized-table>
+ <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
+ <name>ipv6-unicast</name>
+ </advertized-table>
+ <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
+ <name>linkstate</name>
+ </advertized-table>
+ <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
+ <name>ipv4-flowspec</name>
+ </advertized-table>
+ <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
+ <name>ipv6-flowspec</name>
+ </advertized-table>
+</module>
--- /dev/null
+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
<afi-safi>
<afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
</afi-safi>
+ <afi-safi>
+ <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
+ </afi-safi>
+ <afi-safi>
+ <afi-safi-name>IPV4-FLOW</afi-safi-name>
+ </afi-safi>
+ <afi-safi>
+ <afi-safi-name>IPV6-FLOW</afi-safi-name>
+ </afi-safi>
</afi-safis>
</neighbor>
--- /dev/null
+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
+++ /dev/null
-config:modules/module/odl-bgp-rib-impl-cfg:bgp-peer/$NAME
--- /dev/null
+<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+ <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-application-peer</type>
+ <name>$APP_PEER_NAME</name>
+ <bgp-peer-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$APP_PEER_ID</bgp-peer-id>
+ <target-rib xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-instance</type>
+ <name>$RIB_INSTANCE_NAME</name>
+ </target-rib>
+ <application-rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">example-app-rib</application-rib-id>
+ <data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
+ <name>pingpong-broker</name>
+ </data-broker>
+ <bgp-peer-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-registry</type>
+ <name>global-bgp-peer-registry</name>
+ </bgp-peer-registry>
+</module>
--- /dev/null
+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
-<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-application-peer</type>
- <name>$APP_PEER_NAME</name>
- <bgp-peer-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$APP_PEER_ID</bgp-peer-id>
- <target-rib xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-instance</type>
- <name>$RIB_INSTANCE_NAME</name>
- </target-rib>
- <application-rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">example-app-rib</application-rib-id>
- <data-broker xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
- <name>pingpong-broker</name>
- </data-broker>
- <bgp-peer-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-registry</type>
- <name>global-bgp-peer-registry</name>
- </bgp-peer-registry>
-</module>
+<neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
+ <neighbor-address>$IP</neighbor-address>
+ <config>
+ <peer-group>application-peers</peer-group>
+ </config>
+</neighbor>
-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
--- /dev/null
+<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer</type>
+ <name>$BGP_NAME</name>
+ <host xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$IP</host>
+ <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$PEER_PORT</port>
+ <holdtimer xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$HOLDTIME</holdtimer>
+ <initiate-connection xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$INITIATE</initiate-connection>
+ <rib xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:rib-instance</type>
+ <name>$RIB_INSTANCE_NAME</name>
+ </rib>
+ <peer-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-registry</type>
+ <name>global-bgp-peer-registry</name>
+ </peer-registry>
+ <rpc-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
+ <name>binding-rpc-broker</name>
+ </rpc-registry>
+ <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
+ <name>ipv4-unicast</name>
+ </advertized-table>
+ <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
+ <name>ipv6-unicast</name>
+ </advertized-table>
+ <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
+ <name>linkstate</name>
+ </advertized-table>
+ <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
+ <name>ipv4-l3vpn</name>
+ </advertized-table>
+ <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
+ <name>evpn</name>
+ </advertized-table>
+ <add-path xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:add-path</type>
+ <name>ipv4-unicast-both</name>
+ </add-path>
+ <add-path xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:add-path</type>
+ <name>ipv6-unicast-both</name>
+ </add-path>
+</module>
--- /dev/null
+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
-<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer</type>
- <name>$BGP_NAME</name>
- <host xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$IP</host>
- <port xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$PEER_PORT</port>
- <holdtimer xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$HOLDTIME</holdtimer>
- <initiate-connection xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">$INITIATE</initiate-connection>
- <rib xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:rib-instance</type>
- <name>$RIB_INSTANCE_NAME</name>
- </rib>
- <peer-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-peer-registry</type>
- <name>global-bgp-peer-registry</name>
- </peer-registry>
- <rpc-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-rpc-registry</type>
- <name>binding-rpc-broker</name>
- </rpc-registry>
- <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
- <name>ipv4-unicast</name>
- </advertized-table>
- <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
- <name>ipv6-unicast</name>
- </advertized-table>
- <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
- <name>linkstate</name>
- </advertized-table>
- <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
- <name>ipv4-l3vpn</name>
- </advertized-table>
- <advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:bgp-table-type</type>
- <name>evpn</name>
- </advertized-table>
- <add-path xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:add-path</type>
- <name>ipv4-unicast-both</name>
- </add-path>
- <add-path xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <type xmlns:prefix="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">prefix:add-path</type>
- <name>ipv6-unicast-both</name>
- </add-path>
-</module>
+<neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
+ <neighbor-address>$IP</neighbor-address>
+ <route-reflector>
+ <config>
+ <route-reflector-client>false</route-reflector-client>
+ </config>
+ </route-reflector>
+ <timers>
+ <config>
+ <hold-time>$HOLDTIME</hold-time>
+ </config>
+ </timers>
+ <transport>
+ <config>
+ <remote-port>$PEER_PORT</remote-port>
+ <passive-mode>$PASSIVE_MODE</passive-mode>
+ </config>
+ </transport>
+ <config>
+ <peer-type>INTERNAL</peer-type>
+ </config>
+ <afi-safis>
+ <afi-safi>
+ <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
+ </afi-safi>
+ <afi-safi>
+ <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
+ </afi-safi>
+ <afi-safi>
+ <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L2VPN-EVPN</afi-safi-name>
+ </afi-safi>
+ </afi-safis>
+</neighbor>
-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
--- /dev/null
+/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/
--- /dev/null
+<vpn-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-vpn-ipv4">
+ <route-key>vpn1</route-key>
+ <label-stack>
+ <label-value>123</label-value>
+ </label-stack>
+ <route-distinguisher>429496729:1</route-distinguisher>
+ <prefix>2.2.2.2/32</prefix>
+ <attributes>
+ <ipv4-next-hop>
+ <global>199.20.166.41</global>
+ </ipv4-next-hop><as-path/>
+ <origin>
+ <value>igp</value>
+ </origin>
+ <local-pref>
+ <pref>100</pref>
+ </local-pref>
+ </attributes>
+</vpn-route>
-/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
--- /dev/null
+<neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
+ <neighbor-address>$IP</neighbor-address>
+ <route-reflector>
+ <config>
+ <route-reflector-client>false</route-reflector-client>
+ </config>
+ </route-reflector>
+ <timers>
+ <config>
+ <hold-time>$HOLDTIME</hold-time>
+ </config>
+ </timers>
+ <transport>
+ <config>
+ <remote-port>$PEER_PORT</remote-port>
+ <passive-mode>$PASSIVE_MODE</passive-mode>
+ </config>
+ </transport>
+ <config>
+ <peer-type>INTERNAL</peer-type>
+ </config>
+ <afi-safis>
+ <afi-safi>
+ <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
+ <receive>true</receive>
+ <send-max>$MULTIPATH</send-max>
+ </afi-safi>
+ <afi-safi>
+ <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L3VPN-IPV4-UNICAST</afi-safi-name>
+ </afi-safi>
+ <afi-safi>
+ <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:L2VPN-EVPN</afi-safi-name>
+ </afi-safi>
+ </afi-safis>
+</neighbor>
--- /dev/null
+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
--- /dev/null
+<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
+ <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-impl</type>
+ <name>example-bgp-rib</name>
+ <local-as xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">64496</local-as>
+ <dom-data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>pingpong-broker</name>
+ <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
+ </dom-data-provider>
+ <bgp-rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">192.0.2.2</bgp-rib-id>
+ <bgp-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>global-bgp-dispatcher</name>
+ <type>bgp-dispatcher</type>
+ </bgp-dispatcher>
+ <data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>pingpong-binding-data-broker</name>
+ <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-async-data-broker</type>
+ </data-provider>
+ <!--openconfig-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>openconfig-bgp</name>
+ <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp-openconfig-spi">x:bgp-openconfig-provider</type>
+ </openconfig-provider-->
+ <extensions xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>global-rib-extensions</name>
+ <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">x:extensions</type>
+ </extensions>
+ <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>ipv4-unicast</name>
+ <type>bgp-table-type</type>
+ </local-table>
+ <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>ipv6-unicast</name>
+ <type>bgp-table-type</type>
+ </local-table>
+ <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>linkstate</name>
+ <type>bgp-table-type</type>
+ </local-table>
+ <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>ipv4-flowspec</name>
+ <type>bgp-table-type</type>
+ </local-table>
+ <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>ipv6-flowspec</name>
+ <type>bgp-table-type</type>
+ </local-table>
+ <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>ipv4-flowspec-l3vpn</name>
+ <type>bgp-table-type</type>
+ </local-table>
+ <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>ipv6-flowspec-l3vpn</name>
+ <type>bgp-table-type</type>
+ </local-table>
+ <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>ipv4-labeled-unicast</name>
+ <type>bgp-table-type</type>
+ </local-table>
+ <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>ipv6-labeled-unicast</name>
+ <type>bgp-table-type</type>
+ </local-table>
+ <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>ipv4-l3vpn</name>
+ <type>bgp-table-type</type>
+ </local-table>
+ <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>ipv6-l3vpn</name>
+ <type>bgp-table-type</type>
+ </local-table>
+ <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>evpn</name>
+ <type>bgp-table-type</type>
+ </local-table>
+ <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">example-bgp-rib</rib-id>
+ <codec-tree-factory xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>runtime-mapping-singleton</name>
+ <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-codec-tree-factory</type>
+ </codec-tree-factory>
+ <rib-path-selection-mode xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
+ <name>ipv4-unicast-path-selection-mode</name>
+ <type>bgp-path-selection-mode</type>
+ </rib-path-selection-mode>
+</module>
--- /dev/null
+/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
-<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
- <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-impl</type>
- <name>example-bgp-rib</name>
- <local-as xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">64496</local-as>
- <dom-data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>pingpong-broker</name>
- <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
- </dom-data-provider>
- <bgp-rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">192.0.2.2</bgp-rib-id>
- <bgp-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>global-bgp-dispatcher</name>
- <type>bgp-dispatcher</type>
- </bgp-dispatcher>
- <data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>pingpong-binding-data-broker</name>
- <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-async-data-broker</type>
- </data-provider>
- <!--openconfig-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>openconfig-bgp</name>
- <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp-openconfig-spi">x:bgp-openconfig-provider</type>
- </openconfig-provider-->
- <extensions xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>global-rib-extensions</name>
- <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">x:extensions</type>
- </extensions>
- <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>ipv4-unicast</name>
- <type>bgp-table-type</type>
- </local-table>
- <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>ipv6-unicast</name>
- <type>bgp-table-type</type>
- </local-table>
- <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>linkstate</name>
- <type>bgp-table-type</type>
- </local-table>
- <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>ipv4-flowspec</name>
- <type>bgp-table-type</type>
- </local-table>
- <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>ipv6-flowspec</name>
- <type>bgp-table-type</type>
- </local-table>
- <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>ipv4-flowspec-l3vpn</name>
- <type>bgp-table-type</type>
- </local-table>
- <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>ipv6-flowspec-l3vpn</name>
- <type>bgp-table-type</type>
- </local-table>
- <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>ipv4-labeled-unicast</name>
- <type>bgp-table-type</type>
- </local-table>
- <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>ipv6-labeled-unicast</name>
- <type>bgp-table-type</type>
- </local-table>
- <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>ipv4-l3vpn</name>
- <type>bgp-table-type</type>
- </local-table>
- <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>ipv6-l3vpn</name>
- <type>bgp-table-type</type>
- </local-table>
- <local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>evpn</name>
- <type>bgp-table-type</type>
- </local-table>
- <rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">example-bgp-rib</rib-id>
- <codec-tree-factory xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>runtime-mapping-singleton</name>
- <type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-codec-tree-factory</type>
- </codec-tree-factory>
- <rib-path-selection-mode xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
- <name>ipv4-unicast-path-selection-mode</name>
- <type>bgp-path-selection-mode</type>
- </rib-path-selection-mode>
-</module>
+<protocol xmlns="http://openconfig.net/yang/network-instance">
+ <name>example-bgp-rib</name>
+ <identifier xmlns:x="http://openconfig.net/yang/policy-types">x:BGP</identifier>
+ <bgp xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
+ <global>
+ <config>
+ <router-id>192.0.2.2</router-id>
+ <as>64496</as>
+ </config>
+ <afi-safis>
+ <afi-safi>
+ <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name>
+ <receive>true</receive>
+ <send-max>$MULTIPATH</send-max>
+ </afi-safi>
+ </afi-safis>
+ </global>
+ </bgp>
+</protocol>
-/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
-/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/
-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
-/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/