Library SSHLibrary
Resource ${CURDIR}/SSHKeywords.robot
Resource ${CURDIR}/RemoteBash.robot
+Resource ${CURDIR}/BGPcliKeywords.robot
*** Variables ***
+${EXABGP_KILL_COMMAND} ps axf | grep exabgp | grep -v grep | awk '{print \"kill -9 \" $1}' | sh
${CMD} env exabgp.tcp.port=1790 exabgp --debug
${PEER_CHECK_URL} /restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F
BuiltIn.Log ${output}
SSHKeywords.Virtual_Env_Deactivate_On_Current_Session log_output=${True}
+Stop_All_ExaBgps
+ [Documentation] Sends kill command to stop all exabgps running
+ ${output} SSHLibrary.Read
+ BuiltIn.Log ${output}
+ ${output} SSHLibrary.Write ${EXABGP_KILL_COMMAND}
+ BuiltIn.Log ${output}
+
Start_ExaBgp_And_Verify_Connected
[Arguments] ${cfg_file} ${session} ${exabgp_ip} ${connection_retries}=${3}
[Documentation] Starts the ExaBgp and verifies its connection. The verification is done by checking the presence
--- /dev/null
+*** Settings ***
+Documentation Functional test for bgp routing policies
+...
+... Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+...
+... This program and the accompanying materials are made available under the
+... terms of the Eclipse Public License v1.0 which accompanies this distribution,
+... and is available at http://www.eclipse.org/legal/epl-v10.html
+...
+... This suite uses 7 peers: app peer, 2x rr-client, 2x ebgp, 2x ibgp
+... Tests results on effective-rib-in dependant on their respective configurations.
+... Peers 1,2,4,5 are testing multiple ipv4 routes with additional arguments.
+... Peers 3,6 have ipv4 and ipv6 mpls-labeled routes.
+Suite Setup Start_Suite
+Suite Teardown Stop_Suite
+Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
+Library RequestsLibrary
+Library SSHLibrary
+Resource ../../../variables/Variables.robot
+Resource ../../../libraries/ExaBgpLib.robot
+Resource ../../../libraries/SetupUtils.robot
+Resource ../../../libraries/TemplatedRequests.robot
+Resource ../../../libraries/SSHKeywords.robot
+
+*** Variables ***
+${POLICIES_VAR} ${CURDIR}/../../../variables/bgpfunctional/bgppolicies
+${CMD} env exabgp.tcp.port=1790 exabgp --debug
+@{PEER_TYPES} ibgp_peer ibgp_peer ebgp_peer ebgp_peer rr_client_peer rr_client_peer
+@{NUMBERS} 1 2 3 4 5 6
+${HOLDTIME} 180
+${RIB_INSTANCE} example-bgp-rib
+${CONFIG_SESSION} config-session
+
+*** Test Cases ***
+Verify_Rib_Empty
+ [Documentation] Checks empty example-ipv4-topology ready.
+ Verify_Rib_Status_Empty
+
+Configure_App_Peer
+ [Documentation] Configures bgp application peer, and configures it's routes.
+ &{mapping} BuiltIn.Create_Dictionary RIB_INSTANCE_NAME=${RIB_INSTANCE} APP_PEER_ID=${ODL_SYSTEM_IP} BGP_RIB_OPENCONFIG=${RIB_INSTANCE} IP=${ODL_SYSTEM_IP}
+ TemplatedRequests.Post_As_Xml_Templated ${POLICIES_VAR}/app_peer mapping=${mapping} session=${CONFIG_SESSION}
+ TemplatedRequests.Post_As_Xml_Templated ${POLICIES_VAR}/app_peer_route mapping=${mapping} session=${CONFIG_SESSION}
+
+Reconfigure_ODL_To_Accept_Connections
+ [Documentation] Configure BGP peer modules with initiate-connection set to false.
+ ... Configures 6 different peers, two internal, two external and two route-reflectors.
+ : FOR ${index} ${peer_type} IN ZIP ${NUMBERS} ${PEER_TYPES}
+ \ &{mapping} Create Dictionary IP=127.0.0.${index} HOLDTIME=${HOLDTIME} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ \ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ \ TemplatedRequests.Put_As_Xml_Templated ${POLICIES_VAR}${/}${peer_type} mapping=${mapping} session=${CONFIG_SESSION}
+
+Start_Exabgps
+ [Documentation] Start 6 exabgps as processes in background, each with it's own configuration.
+ SSHKeywords.Virtual_Env_Activate_On_Current_Session log_output=${True}
+ : FOR ${index} IN @{NUMBERS}
+ \ ${start_cmd} BuiltIn.Set_Variable ${CMD} exabgp${index}.cfg > exa${index}.log &
+ \ BuiltIn.Log ${start_cmd}
+ \ ${output} SSHLibrary.Write ${start_cmd}
+ \ BuiltIn.Log ${output}
+
+Verify_Rib_Filled
+ [Documentation] Verifies that sent routes are present in particular ribs.
+ [Tags] critical
+ Verify_Rib_Status
+
+Stop_All_Peers
+ [Documentation] Send command to kill all exabgp processes running on controller
+ ExaBgpLib.Stop_All_ExaBgps
+ : FOR ${index} IN @{NUMBERS}
+ \ BGPcliKeywords.Store_File_To_Workspace exa${index}.log exa${index}.log
+
+Delete_Bgp_Peer_Configuration
+ [Documentation] Revert the BGP configuration to the original state: without any configured peers.
+ : FOR ${index} ${peer_type} IN ZIP ${NUMBERS} ${PEER_TYPES}
+ \ &{mapping} Create Dictionary IP=127.0.0.${index} HOLDTIME=${HOLDTIME} PASSIVE_MODE=true BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ \ ... RIB_INSTANCE_NAME=${RIB_INSTANCE}
+ \ TemplatedRequests.Delete_Templated ${POLICIES_VAR}/${peer_type} mapping=${mapping} session=${CONFIG_SESSION}
+
+Deconfigure_App_Peer
+ [Documentation] Revert the BGP configuration to the original state: without application peer
+ &{mapping} BuiltIn.Create_Dictionary IP=${ODL_SYSTEM_IP} BGP_RIB_OPENCONFIG=${RIB_INSTANCE}
+ TemplatedRequests.Delete_Templated ${POLICIES_VAR}/app_peer mapping=${mapping} session=${CONFIG_SESSION}
+ TemplatedRequests.Delete_Templated ${POLICIES_VAR}/app_peer_route mapping=${mapping} session=${CONFIG_SESSION}
+
+*** Keywords ***
+Start_Suite
+ [Documentation] Suite setup keyword.
+ SetupUtils.Setup_Utils_For_Setup_And_Teardown
+ ${conn_id}= SSHLibrary.Open Connection ${ODL_SYSTEM_IP} prompt=${DEFAULT_LINUX_PROMPT} timeout=10s
+ Builtin.Set_Suite_Variable ${conn_id}
+ SSHKeywords.Flexible_Controller_Login
+ SSHKeywords.Virtual_Env_Create
+ SSHKeywords.Virtual_Env_Install_Package exabgp==4.0.5
+ RequestsLibrary.Create_Session ${CONFIG_SESSION} http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH}
+ Upload_Config_Files
+
+Stop_Suite
+ [Documentation] Suite teardown keyword
+ SSHKeywords.Virtual_Env_Delete
+ SSHLibrary.Close_All_Connections
+ RequestsLibrary.Delete_All_Sessions
+
+Verify_Rib_Status
+ [Documentation] Verify output from effective-rib-in for each of the 6 exabgp peers and app peer.
+ ... First request is for full example-bgp-rib and it's output is logged for debug purposes.
+ ... Each of the peers have different output which is stored in folder by their respective
+ ... numbers as peer_${index} (peer_1, peer_2 ...)
+ # gets and outputs full rib output for debug purposes if one of the peers reports faulty data.
+ ${output} TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/rib_state session=${CONFIG_SESSION}
+ BuiltIn.Log ${output}
+ : FOR ${index} IN @{NUMBERS}
+ \ &{mapping} BuiltIn.Create_Dictionary IP=127.0.0.${index}
+ \ BuiltIn.Wait_Until_Keyword_Succeeds 5x 3s TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/effective_rib_in/peer_${index} mapping=${mapping}
+ \ ... session=${CONFIG_SESSION} verify=True
+ &{mapping} BuiltIn.Create_Dictionary IP=${ODL_SYSTEM_IP}
+ # application peer verification
+ BuiltIn.Wait_Until_Keyword_Succeeds 5x 3s TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/app_peer_rib mapping=${mapping} session=${CONFIG_SESSION}
+ ... verify=True
+
+Verify_Rib_Status_Empty
+ [Documentation] Checks that example-ipv4-topology is ready, and therefore full rib is ready to be configured.
+ BuiltIn.Wait_Until_Keyword_Succeeds 60s 3s TemplatedRequests.Get_As_Json_Templated ${POLICIES_VAR}/topology_state session=${CONFIG_SESSION} verify=True
+
+Upload_Config_Files
+ [Documentation] Uploads exabgp config files and replaces variables within those
+ ... config files with desired values.
+ : FOR ${index} IN @{NUMBERS}
+ \ SSHLibrary.Put_File ${POLICIES_VAR}/exabgp_configs/exabgp${index}.cfg .
+ @{cfgfiles}= SSHLibrary.List_Files_In_Directory . *.cfg
+ : FOR ${cfgfile} IN @{cfgfiles}
+ \ SSHLibrary.Execute_Command sed -i -e 's/ODLIP/${ODL_SYSTEM_IP}/g' ${cfgfile}
+ \ SSHLibrary.Execute_Command sed -i -e 's/ROUTEREFRESH/disable/g' ${cfgfile}
+ \ SSHLibrary.Execute_Command sed -i -e 's/ADDPATH/disable/g' ${cfgfile}
+ \ ${stdout}= SSHLibrary.Execute_Command cat ${cfgfile}
+ \ Log ${stdout}
--- /dev/null
+# Copyright (c) 2018 Cisco Systems, Inc. and others. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+
+# Place the suites in run order:
+integration/test/csit/suites/bgpcep/bgpfunct/050_bmp_basic.robot
+integration/test/csit/suites/bgpcep/pcepuser/pcepuser.robot
+integration/test/csit/suites/bgpcep/bgpfunct/bgp_functional_md5.robot
+integration/test/csit/suites/bgpcep/bgpuser/basic.robot
+integration/test/csit/suites/bgpcep/bgpuser/bgp_app_peer_basic.robot
+integration/test/csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot
+integration/test/csit/suites/bgpcep/bgpuser/ebgp_peers_basic.robot
+integration/test/csit/suites/bgpcep/bgpflowspec/010_bgp_flowspec.robot
+integration/test/csit/suites/bgpcep/bgpuser/ibgp_peer_lsp.robot
+integration/test/csit/suites/bgpcep/bgpfunct/010_bgp_functional_l3vpn.robot
+integration/test/csit/suites/bgpcep/bgpfunct/030_bgp_functional_evpn.robot
+integration/test/csit/suites/bgpcep/bgpfunct/040_bgp_functional_route_ref.robot
+integration/test/csit/suites/bgpcep/bgpfunct/020_bgp_functional_multipath.robot
+integration/test/csit/suites/bgpcep/bgpfunct/bgp_policies_default.robot
+integration/test/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot
--- /dev/null
+# Copyright (c) 2018 Cisco Systems, Inc. and others. All rights reserved.
+#
+# This program and the accompanying materials are made available under the
+# terms of the Eclipse Public License v1.0 which accompanies this distribution,
+# and is available at http://www.eclipse.org/legal/epl-v10.html
+
+# Place the suites in run order:
+integration/test/csit/suites/bgpcep/bgpfunct/050_bmp_basic.robot
+integration/test/csit/suites/bgpcep/pcepuser/pcepuser.robot
+integration/test/csit/suites/bgpcep/bgpfunct/bgp_functional_md5.robot
+integration/test/csit/suites/bgpcep/bgpuser/basic.robot
+integration/test/csit/suites/bgpcep/bgpuser/bgp_app_peer_basic.robot
+integration/test/csit/suites/bgpcep/bgpuser/ibgp_peers_basic.robot
+integration/test/csit/suites/bgpcep/bgpuser/ebgp_peers_basic.robot
+integration/test/csit/suites/bgpcep/bgpflowspec/010_bgp_flowspec.robot
+integration/test/csit/suites/bgpcep/bgpuser/ibgp_peer_lsp.robot
+integration/test/csit/suites/bgpcep/bgpfunct/010_bgp_functional_l3vpn.robot
+integration/test/csit/suites/bgpcep/bgpfunct/030_bgp_functional_evpn.robot
+integration/test/csit/suites/bgpcep/bgpfunct/040_bgp_functional_route_ref.robot
+integration/test/csit/suites/bgpcep/bgpfunct/020_bgp_functional_multipath.robot
+integration/test/csit/suites/bgpcep/bgpfunct/bgp_policies_default.robot
+integration/test/csit/suites/bgpcep/tcpmd5user/tcpmd5user.robot
--- /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/
--- /dev/null
+<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>
--- /dev/null
+{
+ "bgp-inet:ipv4-routes": {
+ "ipv4-route": [
+ {
+ "attributes": {
+ "as-path": {},
+ "ipv4-next-hop": {
+ "global": "10.11.1.1"
+ },
+ "local-pref": {
+ "pref": 100
+ },
+ "origin": {
+ "value": "igp"
+ }
+ },
+ "path-id": 0,
+ "prefix": "10.0.0.17/32"
+ }
+ ]
+ }
+}
--- /dev/null
+restconf/config/bgp-rib:application-rib/$IP/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes
--- /dev/null
+restconf/config/bgp-rib:application-rib/$IP/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes
--- /dev/null
+<ipv4-route xmlns="urn:opendaylight:params:xml:ns:yang:bgp-inet">
+ <path-id>0</path-id>
+ <prefix>10.0.0.17/32</prefix>
+ <attributes>
+ <as-path></as-path>
+ <origin>
+ <value>igp</value>
+ </origin>
+ <local-pref>
+ <pref>100</pref>
+ </local-pref>
+ <ipv4-next-hop>
+ <global>10.11.1.1</global>
+ </ipv4-next-hop>
+ </attributes>
+</ipv4-route>
--- /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>179</remote-port>
+ <passive-mode>$PASSIVE_MODE</passive-mode>
+ </config>
+ </transport>
+ <config>
+ <peer-type>EXTERNAL</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:IPV6-UNICAST</afi-safi-name>
+ </afi-safi>
+ <afi-safi>
+ <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
+ </afi-safi>
+ <afi-safi>
+ <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-LABELLED-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:L3VPN-IPV6-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-safi>
+ <afi-safi-name>LINKSTATE</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-safi>
+ <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name>
+ </afi-safi>
+ <afi-safi>
+ <afi-safi-name>IPV6-L3VPN-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
+restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F$IP/effective-rib-in
--- /dev/null
+{
+ "bgp-inet:ipv4-routes": {
+ "ipv4-route": [
+ {
+ "attributes": {
+ "as-path": {},
+ "communities": [
+ {
+ "as-number": 30741,
+ "semantics": 0
+ },
+ {
+ "as-number": 30741,
+ "semantics": 30741
+ }
+ ],
+ "ipv4-next-hop": {
+ "global": "11.0.255.254"
+ },
+ "local-pref": {
+ "pref": 100
+ },
+ "origin": {
+ "value": "igp"
+ }
+ },
+ "path-id": 0,
+ "prefix": "1.1.1.0/24"
+ }
+ ]
+ }
+}
--- /dev/null
+restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F$IP/effective-rib-in/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes
--- /dev/null
+{
+ "bgp-inet:ipv4-routes": {
+ "ipv4-route": [
+ {
+ "attributes": {
+ "as-path": {},
+ "ipv4-next-hop": {
+ "global": "12.0.255.254"
+ },
+ "local-pref": {
+ "pref": 100
+ },
+ "origin": {
+ "value": "igp"
+ }
+ },
+ "path-id": 0,
+ "prefix": "2.1.1.0/24"
+ },
+ {
+ "attributes": {
+ "as-path": {},
+ "ipv4-next-hop": {
+ "global": "12.1.255.254"
+ },
+ "local-pref": {
+ "pref": 100
+ },
+ "origin": {
+ "value": "igp"
+ }
+ },
+ "path-id": 0,
+ "prefix": "2.2.1.0/24"
+ },
+ {
+ "attributes": {
+ "as-path": {},
+ "ipv4-next-hop": {
+ "global": "12.3.255.254"
+ },
+ "local-pref": {
+ "pref": 100
+ },
+ "origin": {
+ "value": "igp"
+ }
+ },
+ "path-id": 0,
+ "prefix": "2.3.1.0/24"
+ }
+ ]
+ }
+}
--- /dev/null
+restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F$IP/effective-rib-in/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes
--- /dev/null
+{
+ "bgp-vpn-ipv4:vpn-ipv4-routes": {
+ "vpn-route": [
+ {
+ "attributes": {
+ "as-path": {
+ "segments": [
+ {
+ "as-sequence": [
+ 35000,
+ 60000,
+ 64000
+ ]
+ }
+ ]
+ },
+ "communities": [
+ {
+ "as-number": 64000,
+ "semantics": 43
+ }
+ ],
+ "extended-communities": [
+ {
+ "route-target-extended-community": {
+ "global-administrator": 24563,
+ "local-administrator": "ByNLLg=="
+ },
+ "transitive": true
+ }
+ ],
+ "ipv4-next-hop": {
+ "global": "104.36.0.254"
+ },
+ "origin": {
+ "value": "igp"
+ }
+ },
+ "label-stack": [
+ {
+ "label-value": 256
+ }
+ ],
+ "prefix": "103.36.0.0/24",
+ "route-distinguisher": "0:3548:478513974",
+ "route-key": "WAAADdwchYs2ZyQA"
+ }
+ ]
+ }
+}
--- /dev/null
+restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F$IP/effective-rib-in/tables/bgp-types:ipv4-address-family/bgp-types:mpls-labeled-vpn-subsequent-address-family/bgp-vpn-ipv4:vpn-ipv4-routes
--- /dev/null
+{
+ "bgp-inet:ipv4-routes": {
+ "ipv4-route": [
+ {
+ "attributes": {
+ "as-path": {},
+ "communities": [
+ {
+ "as-number": 30740,
+ "semantics": 0
+ },
+ {
+ "as-number": 30740,
+ "semantics": 30740
+ }
+ ],
+ "ipv4-next-hop": {
+ "global": "14.0.255.254"
+ },
+ "origin": {
+ "value": "igp"
+ }
+ },
+ "path-id": 0,
+ "prefix": "4.1.1.0/24"
+ }
+ ]
+ }
+}
--- /dev/null
+restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F$IP/effective-rib-in/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes
--- /dev/null
+{
+ "bgp-inet:ipv4-routes": {
+ "ipv4-route": [
+ {
+ "attributes": {
+ "as-path": {},
+ "extended-communities": [
+ {
+ "route-target-extended-community": {
+ "global-administrator": 31740,
+ "local-administrator": "AAB7/A=="
+ },
+ "transitive": true
+ }
+ ],
+ "ipv4-next-hop": {
+ "global": "15.0.255.254"
+ },
+ "local-pref": {
+ "pref": 100
+ },
+ "origin": {
+ "value": "igp"
+ }
+ },
+ "path-id": 0,
+ "prefix": "5.1.1.0/24"
+ }
+ ]
+ }
+}
--- /dev/null
+restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F$IP/effective-rib-in/tables/bgp-types:ipv4-address-family/bgp-types:unicast-subsequent-address-family/bgp-inet:ipv4-routes
--- /dev/null
+{
+ "bgp-vpn-ipv6:vpn-ipv6-routes": {
+ "vpn-route": [
+ {
+ "attributes": {
+ "as-path": {
+ "segments": [
+ {
+ "as-sequence": [
+ 25186,
+ 64512,
+ 65000
+ ]
+ }
+ ]
+ },
+ "communities": [
+ {
+ "as-number": 65000,
+ "semantics": 33
+ }
+ ],
+ "extended-communities": [
+ {
+ "route-target-extended-community": {
+ "global-administrator": 10283,
+ "local-administrator": "BPlceA=="
+ },
+ "transitive": true
+ }
+ ],
+ "ipv6-next-hop": {
+ "global": "::ffff"
+ },
+ "local-pref": {
+ "pref": 100
+ },
+ "origin": {
+ "value": "igp"
+ },
+ "originator-id": {
+ "originator": "57.35.2.240"
+ }
+ },
+ "label-stack": [
+ {
+ "label-value": 926
+ }
+ ],
+ "prefix": "2001:4b50:20c0::/48",
+ "route-distinguisher": "0:3215:583457597",
+ "route-key": "cAAADI8ixts9IAFLUCDA"
+ }
+ ]
+ }
+}
--- /dev/null
+restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib/peer/bgp:%2F%2F$IP/effective-rib-in/tables/bgp-types:ipv6-address-family/bgp-types:mpls-labeled-vpn-subsequent-address-family/bgp-vpn-ipv6:vpn-ipv6-routes
--- /dev/null
+neighbor ODLIP {
+ router-id 127.0.0.1;
+ local-address 127.0.0.1;
+ local-as 64496;
+ peer-as 64496;
+
+ static {
+ route 1.1.1.1/24 {
+ next-hop 11.0.255.254;
+ community [ 30741:30741 30741:0 ];
+ }
+ }
+
+ capability {
+ route-refresh ROUTEREFRESH;
+ add-path ADDPATH;
+ }
+
+ family {
+ all
+ }
+}
--- /dev/null
+neighbor ODLIP {
+ router-id 127.0.0.2;
+ local-address 127.0.0.2;
+ local-as 64496;
+ peer-as 64496;
+
+ static {
+ route 2.1.1.0/24 {
+ next-hop 12.0.255.254;
+ }
+ route 2.2.1.0/24 {
+ next-hop 12.1.255.254;
+ }
+ route 2.3.1.0/24 {
+ next-hop 12.3.255.254;
+ }
+ }
+
+ capability {
+ route-refresh ROUTEREFRESH;
+ add-path ADDPATH;
+ }
+
+ family {
+ all
+ }
+}
--- /dev/null
+neighbor ODLIP {
+ router-id 127.0.0.3;
+ local-address 127.0.0.3;
+ local-as 64496;
+ peer-as 64496;
+
+ static {
+ route 103.36.0.5/24 {
+ rd 3548:478513974;
+ as-path [ 35000 64000 60000 ];
+ next-hop 104.36.0.254;
+ originator-id 27.4.5.6;
+ local-preference 100;
+ community [ 64000:43 ];
+ extended-community [ target:24563:7.35.75.46 ];
+ label 256;
+ }
+ }
+
+ capability {
+ route-refresh ROUTEREFRESH;
+ add-path ADDPATH;
+ }
+
+ family {
+ all
+ }
+}
--- /dev/null
+neighbor ODLIP {
+ router-id 127.0.0.4;
+ local-address 127.0.0.4;
+ local-as 64496;
+ peer-as 64496;
+
+ static {
+ route 4.1.1.0/24 {
+ next-hop 14.0.255.254;
+ community [ 30740:30740 30740:0 ];
+ }
+ }
+
+ capability {
+ route-refresh ROUTEREFRESH;
+ add-path ADDPATH;
+ }
+
+ family {
+ all
+ }
+}
--- /dev/null
+neighbor ODLIP {
+ router-id 127.0.0.5;
+ local-address 127.0.0.5;
+ local-as 64496;
+ peer-as 64496;
+
+ static {
+ route 5.1.1.0/24 {
+ next-hop 15.0.255.254;
+ extended-community 31740:31740 extended-community [ 32740:32740 32740:0 ];
+ }
+ }
+
+ capability {
+ route-refresh ROUTEREFRESH;
+ add-path ADDPATH;
+ }
+
+ family {
+ all
+ }
+}
--- /dev/null
+neighbor ODLIP {
+ router-id 127.0.0.6;
+ local-address 127.0.0.6;
+ local-as 64496;
+ peer-as 64496;
+
+ static {
+ route 2001:4B50:20C0::/48 {
+ rd 3215:583457597;
+ as-path [ 25186 65000 64512 ];
+ next-hop ::FFFF;
+ originator-id 57.35.2.240;
+ local-preference 100;
+ community [ 65000:33 ];
+ extended-community [ target:10283:4.249.92.120 ];
+ label 926;
+ }
+ }
+
+ capability {
+ route-refresh ROUTEREFRESH;
+ add-path ADDPATH;
+ }
+
+ family {
+ all
+ }
+}
--- /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>179</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:IPV6-UNICAST</afi-safi-name>
+ </afi-safi>
+ <afi-safi>
+ <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
+ </afi-safi>
+ <afi-safi>
+ <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-LABELLED-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:L3VPN-IPV6-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-safi>
+ <afi-safi-name>LINKSTATE</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-safi>
+ <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name>
+ </afi-safi>
+ <afi-safi>
+ <afi-safi-name>IPV6-L3VPN-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
+restconf/operational/bgp-rib:bgp-rib/rib/example-bgp-rib
--- /dev/null
+<neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions">
+ <neighbor-address>$IP</neighbor-address>
+ <route-reflector>
+ <config>
+ <route-reflector-client>true</route-reflector-client>
+ </config>
+ </route-reflector>
+ <timers>
+ <config>
+ <hold-time>$HOLDTIME</hold-time>
+ </config>
+ </timers>
+ <transport>
+ <config>
+ <remote-port>179</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:IPV6-UNICAST</afi-safi-name>
+ </afi-safi>
+ <afi-safi>
+ <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-LABELLED-UNICAST</afi-safi-name>
+ </afi-safi>
+ <afi-safi>
+ <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV6-LABELLED-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:L3VPN-IPV6-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-safi>
+ <afi-safi-name>LINKSTATE</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-safi>
+ <afi-safi-name>IPV4-L3VPN-FLOW</afi-safi-name>
+ </afi-safi>
+ <afi-safi>
+ <afi-safi-name>IPV6-L3VPN-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
+{
+ "topology": [
+ {
+ "topology-id": "example-ipv4-topology",
+ "server-provided": true,
+ "topology-types": {
+ "odl-bgp-topology-types:bgp-ipv4-reachability-topology": {}
+ }
+ }
+ ]
+}
--- /dev/null
+/restconf/operational/network-topology:network-topology/topology/example-ipv4-topology