summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Winter <mwinter@opensourcerouting.org>2023-12-14 05:46:24 -0800
committerGitHub <noreply@github.com>2023-12-14 05:46:24 -0800
commit0d57a9a9546c26021e70ba5986823f8520e581ea (patch)
treea52f9704128a5f32e09beb5b7c74aff1d71dd70a
parent5e87eae543df6d841cfb812ecaf01f7afd4ef76a (diff)
parent73ce39c443b0942537f7357cd64dcc8294b61d85 (diff)
Merge pull request #14890 from louis-6wind/exabgp4
topotests: convert to exabgp 4 and python3
-rw-r--r--doc/developer/building-frr-for-ubuntu2004.rst14
-rw-r--r--doc/developer/building-frr-for-ubuntu2204.rst14
-rw-r--r--doc/developer/topotests.rst11
-rw-r--r--docker/ubuntu-ci/Dockerfile7
-rw-r--r--tests/topotests/bgp_ecmp_topo1/exabgp.env1
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer1/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer1/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer10/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer10/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer11/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer11/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer12/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer12/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer13/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer13/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer14/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer14/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer15/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer15/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer16/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer16/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer17/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer17/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer18/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer18/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer19/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer19/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer2/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer2/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer20/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer20/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer3/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer3/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer4/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer4/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer5/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer5/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer6/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer6/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer7/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer7/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer8/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer8/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_ecmp_topo1/peer9/exa-send.py2
-rw-r--r--tests/topotests/bgp_ecmp_topo1/peer9/exabgp.cfg33
-rw-r--r--tests/topotests/bgp_ecmp_topo1/test_bgp_ecmp_topo1.py2
-rw-r--r--tests/topotests/bgp_multiview_topo1/exabgp.env1
-rwxr-xr-xtests/topotests/bgp_multiview_topo1/peer1/exa-send.py2
-rw-r--r--tests/topotests/bgp_multiview_topo1/peer1/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_multiview_topo1/peer2/exa-send.py2
-rw-r--r--tests/topotests/bgp_multiview_topo1/peer2/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_multiview_topo1/peer3/exa-send.py2
-rw-r--r--tests/topotests/bgp_multiview_topo1/peer3/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_multiview_topo1/peer4/exa-send.py2
-rw-r--r--tests/topotests/bgp_multiview_topo1/peer4/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_multiview_topo1/peer5/exa-send.py2
-rw-r--r--tests/topotests/bgp_multiview_topo1/peer5/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_multiview_topo1/peer6/exa-send.py2
-rw-r--r--tests/topotests/bgp_multiview_topo1/peer6/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_multiview_topo1/peer7/exa-send.py2
-rw-r--r--tests/topotests/bgp_multiview_topo1/peer7/exabgp.cfg33
-rwxr-xr-xtests/topotests/bgp_multiview_topo1/peer8/exa-send.py2
-rw-r--r--tests/topotests/bgp_multiview_topo1/peer8/exabgp.cfg33
-rw-r--r--tests/topotests/bgp_peer_type_multipath_relax/exabgp.env3
-rw-r--r--tests/topotests/bgp_peer_type_multipath_relax/peer1/exa_readpipe.py2
-rw-r--r--tests/topotests/bgp_peer_type_multipath_relax/peer1/exabgp.cfg32
-rw-r--r--tests/topotests/bgp_peer_type_multipath_relax/peer2/exa_readpipe.py2
-rw-r--r--tests/topotests/bgp_peer_type_multipath_relax/peer2/exabgp.cfg32
-rw-r--r--tests/topotests/bgp_peer_type_multipath_relax/peer3/exa_readpipe.py2
-rw-r--r--tests/topotests/bgp_peer_type_multipath_relax/peer3/exabgp.cfg32
-rw-r--r--tests/topotests/bgp_peer_type_multipath_relax/peer4/exa_readpipe.py2
-rw-r--r--tests/topotests/bgp_peer_type_multipath_relax/peer4/exabgp.cfg32
-rwxr-xr-xtests/topotests/bgp_peer_type_multipath_relax/test_bgp_peer-type_multipath-relax.py161
-rw-r--r--tests/topotests/bgp_prefix_sid/exabgp.env1
-rw-r--r--tests/topotests/bgp_prefix_sid/peer1/exabgp.cfg190
-rw-r--r--tests/topotests/bgp_prefix_sid/peer2/exabgp.cfg31
-rw-r--r--tests/topotests/bgp_prefix_sid/test_bgp_prefix_sid.py34
-rw-r--r--tests/topotests/bgp_prefix_sid2/peer1/exabgp.cfg46
-rw-r--r--tests/topotests/bgp_prefix_sid2/r1/bgpd.conf2
-rw-r--r--tests/topotests/bgp_prefix_sid2/r1/vpnv6_rib_entry1.json4
-rw-r--r--tests/topotests/bgp_prefix_sid2/r1/vpnv6_rib_entry2.json4
-rw-r--r--tests/topotests/bgp_vrf_md5_peering/peer1/exabgp.cfg2
-rw-r--r--tests/topotests/bgp_vrf_netns/exabgp.env1
-rwxr-xr-xtests/topotests/bgp_vrf_netns/peer1/exa-send.py2
-rw-r--r--tests/topotests/bgp_vrf_netns/peer1/exabgp.cfg33
-rw-r--r--tests/topotests/lib/common_config.py7
-rw-r--r--tests/topotests/lib/topogen.py40
-rw-r--r--tests/topotests/pytest.ini2
88 files changed, 849 insertions, 880 deletions
diff --git a/doc/developer/building-frr-for-ubuntu2004.rst b/doc/developer/building-frr-for-ubuntu2004.rst
index fdfc25da9d..a37b5140ba 100644
--- a/doc/developer/building-frr-for-ubuntu2004.rst
+++ b/doc/developer/building-frr-for-ubuntu2004.rst
@@ -15,7 +15,7 @@ Installing Dependencies
pkg-config libpam0g-dev libjson-c-dev bison flex \
libc-ares-dev python3-dev python3-sphinx \
install-info build-essential libsnmp-dev perl \
- libcap-dev python2 libelf-dev libunwind-dev
+ libcap-dev libelf-dev libunwind-dev
.. include:: building-libunwind-note.rst
@@ -23,18 +23,6 @@ Note that Ubuntu 20 no longer installs python 2.x, so it must be
installed explicitly. Ensure that your system has a symlink named
``/usr/bin/python`` pointing at ``/usr/bin/python3``.
-In addition, ``pip`` for python2 must be installed if you wish to run
-the FRR topotests. That version of ``pip`` is not available from the
-ubuntu apt repositories; in order to install it:
-
-.. code-block:: shell
-
- curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
- sudo python2 ./get-pip.py
-
- # And verify the installation
- pip2 --version
-
.. include:: building-libyang.rst
Protobuf
diff --git a/doc/developer/building-frr-for-ubuntu2204.rst b/doc/developer/building-frr-for-ubuntu2204.rst
index 97bdf8806b..f7c30498ec 100644
--- a/doc/developer/building-frr-for-ubuntu2204.rst
+++ b/doc/developer/building-frr-for-ubuntu2204.rst
@@ -15,7 +15,7 @@ Installing Dependencies
pkg-config libpam0g-dev libjson-c-dev bison flex \
libc-ares-dev python3-dev python3-sphinx \
install-info build-essential libsnmp-dev perl \
- libcap-dev python2 libelf-dev libunwind-dev \
+ libcap-dev libelf-dev libunwind-dev \
libyang2 libyang2-dev
.. include:: building-libunwind-note.rst
@@ -29,18 +29,6 @@ installed explicitly. Ensure that your system has a symlink named
sudo ln -s /usr/bin/python3 /usr/bin/python
python --version
-In addition, ``pip`` for python2 must be installed if you wish to run
-the FRR topotests. That version of ``pip`` is not available from the
-ubuntu apt repositories; in order to install it:
-
-.. code-block:: shell
-
- curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
- sudo python2 ./get-pip.py
-
- # And verify the installation
- pip2 --version
-
Protobuf
^^^^^^^^
diff --git a/doc/developer/topotests.rst b/doc/developer/topotests.rst
index c9857963bd..b50ec486ec 100644
--- a/doc/developer/topotests.rst
+++ b/doc/developer/topotests.rst
@@ -8,14 +8,12 @@ Topotests is a suite of topology tests for FRR built on top of micronet.
Installation and Setup
----------------------
-Topotests run under python3. Additionally, for ExaBGP (which is used
-in some of the BGP tests) an older python2 version (and the python2
-version of ``pip``) must be installed.
+Topotests run under python3.
Tested with Ubuntu 20.04,Ubuntu 18.04, and Debian 11.
-Instructions are the same for all setups (i.e. ExaBGP is only used for
-BGP tests).
+Instructions are the same for all setups. However, ExaBGP is only used for
+BGP tests.
Tshark is only required if you enable any packet captures on test runs.
@@ -39,8 +37,7 @@ Installing Topotest Requirements
python3 -m pip install 'pytest-xdist>=2.3.0'
python3 -m pip install 'scapy>=2.4.5'
python3 -m pip install xmltodict
- # Use python2 pip to install older ExaBGP
- python2 -m pip install 'exabgp<4.0.0'
+ python3 -m pip install git+https://github.com/Exa-Networks/exabgp@0659057837cd6c6351579e9f0fa47e9fb7de7311
useradd -d /var/run/exabgp/ -s /bin/false exabgp
# To enable the gRPC topotest install:
diff --git a/docker/ubuntu-ci/Dockerfile b/docker/ubuntu-ci/Dockerfile
index 1b3deb2750..f228fe808e 100644
--- a/docker/ubuntu-ci/Dockerfile
+++ b/docker/ubuntu-ci/Dockerfile
@@ -52,7 +52,7 @@ RUN apt update && apt upgrade -y && \
libssl-dev \
lua5.3 \
net-tools \
- python2 \
+ python3 \
python3-pip \
snmp \
snmp-mibs-downloader \
@@ -67,9 +67,6 @@ RUN apt update && apt upgrade -y && \
wget https://raw.githubusercontent.com/FRRouting/frr-mibs/main/iana/IANA-IPPM-METRICS-REGISTRY-MIB -O /usr/share/snmp/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB && \
wget https://raw.githubusercontent.com/FRRouting/frr-mibs/main/ietf/SNMPv2-PDU -O /usr/share/snmp/mibs/ietf/SNMPv2-PDU && \
wget https://raw.githubusercontent.com/FRRouting/frr-mibs/main/ietf/IPATM-IPMC-MIB -O /usr/share/snmp/mibs/ietf/IPATM-IPMC-MIB && \
- curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output /tmp/get-pip.py && \
- python2 /tmp/get-pip.py && \
- rm -f /tmp/get-pip.py && \
python3 -m pip install wheel && \
python3 -m pip install pytest && \
python3 -m pip install pytest-sugar && \
@@ -77,7 +74,7 @@ RUN apt update && apt upgrade -y && \
python3 -m pip install "scapy>=2.4.2" && \
python3 -m pip install xmltodict && \
python3 -m pip install grpcio grpcio-tools && \
- python2 -m pip install 'exabgp<4.0.0'
+ python3 -m pip install git+https://github.com/Exa-Networks/exabgp@0659057837cd6c6351579e9f0fa47e9fb7de7311
RUN groupadd -r -g 92 frr && \
groupadd -r -g 85 frrvty && \
diff --git a/tests/topotests/bgp_ecmp_topo1/exabgp.env b/tests/topotests/bgp_ecmp_topo1/exabgp.env
index a328e04962..ec978c66e7 100644
--- a/tests/topotests/bgp_ecmp_topo1/exabgp.env
+++ b/tests/topotests/bgp_ecmp_topo1/exabgp.env
@@ -1,5 +1,6 @@
[exabgp.api]
+ack = false
encoder = text
highres = false
respawn = false
diff --git a/tests/topotests/bgp_ecmp_topo1/peer1/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer1/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer1/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer1/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer1/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer1/exabgp.cfg
index 2d0ca89f0f..97a024ce96 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer1/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer1/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 1 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 1";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 1 10;
+ encoder text;
+}
- neighbor 10.0.1.1 {
- router-id 10.0.1.101;
- local-address 10.0.1.101;
- local-as 99;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 1;
+ encoder text;
+}
+neighbor 10.0.1.1 {
+ router-id 10.0.1.101;
+ local-address 10.0.1.101;
+ local-as 99;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer10/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer10/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer10/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer10/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer10/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer10/exabgp.cfg
index 0c842a0e7f..e318162a1f 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer10/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer10/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 10 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 10";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 10 10;
+ encoder text;
+}
- neighbor 10.0.2.1 {
- router-id 10.0.2.110;
- local-address 10.0.2.110;
- local-as 99;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 10;
+ encoder text;
+}
+neighbor 10.0.2.1 {
+ router-id 10.0.2.110;
+ local-address 10.0.2.110;
+ local-as 99;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer11/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer11/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer11/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer11/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer11/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer11/exabgp.cfg
index 936dc572bd..ea5bdcce80 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer11/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer11/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 11 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 11";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 11 10;
+ encoder text;
+}
- neighbor 10.0.3.1 {
- router-id 10.0.3.111;
- local-address 10.0.3.111;
- local-as 111;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 11;
+ encoder text;
+}
+neighbor 10.0.3.1 {
+ router-id 10.0.3.111;
+ local-address 10.0.3.111;
+ local-as 111;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer12/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer12/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer12/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer12/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer12/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer12/exabgp.cfg
index 56b33eae8e..81fb5035f7 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer12/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer12/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 12 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 12";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 12 10;
+ encoder text;
+}
- neighbor 10.0.3.1 {
- router-id 10.0.3.112;
- local-address 10.0.3.112;
- local-as 112;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 12;
+ encoder text;
+}
+neighbor 10.0.3.1 {
+ router-id 10.0.3.112;
+ local-address 10.0.3.112;
+ local-as 112;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer13/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer13/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer13/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer13/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer13/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer13/exabgp.cfg
index b933ffb5cf..40078411ec 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer13/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer13/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 13 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 13";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 13 10;
+ encoder text;
+}
- neighbor 10.0.3.1 {
- router-id 10.0.3.113;
- local-address 10.0.3.113;
- local-as 113;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 13;
+ encoder text;
+}
+neighbor 10.0.3.1 {
+ router-id 10.0.3.113;
+ local-address 10.0.3.113;
+ local-as 113;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer14/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer14/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer14/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer14/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer14/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer14/exabgp.cfg
index bcfa41eb2e..afb8741636 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer14/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer14/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 14 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 14";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 14 10;
+ encoder text;
+}
- neighbor 10.0.3.1 {
- router-id 10.0.3.114;
- local-address 10.0.3.114;
- local-as 114;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 14;
+ encoder text;
+}
+neighbor 10.0.3.1 {
+ router-id 10.0.3.114;
+ local-address 10.0.3.114;
+ local-as 114;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer15/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer15/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer15/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer15/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer15/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer15/exabgp.cfg
index 022e835798..9a4ca7f695 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer15/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer15/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 15 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 15";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 15 10;
+ encoder text;
+}
- neighbor 10.0.3.1 {
- router-id 10.0.3.115;
- local-address 10.0.3.115;
- local-as 115;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 15;
+ encoder text;
+}
+neighbor 10.0.3.1 {
+ router-id 10.0.3.115;
+ local-address 10.0.3.115;
+ local-as 115;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer16/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer16/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer16/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer16/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer16/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer16/exabgp.cfg
index 0649202f1f..a0bb88a3f3 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer16/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer16/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 16 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 16";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 16 10;
+ encoder text;
+}
- neighbor 10.0.4.1 {
- router-id 10.0.4.116;
- local-address 10.0.4.116;
- local-as 116;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 16;
+ encoder text;
+}
+neighbor 10.0.4.1 {
+ router-id 10.0.4.116;
+ local-address 10.0.4.116;
+ local-as 116;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer17/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer17/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer17/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer17/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer17/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer17/exabgp.cfg
index 0aeeed9d95..870d33d455 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer17/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer17/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 17 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 17";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 17 10;
+ encoder text;
+}
- neighbor 10.0.4.1 {
- router-id 10.0.4.117;
- local-address 10.0.4.117;
- local-as 117;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 17;
+ encoder text;
+}
+neighbor 10.0.4.1 {
+ router-id 10.0.4.117;
+ local-address 10.0.4.117;
+ local-as 117;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer18/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer18/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer18/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer18/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer18/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer18/exabgp.cfg
index 352c030eda..c5a1ca62e4 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer18/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer18/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 18 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 18";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 18 10;
+ encoder text;
+}
- neighbor 10.0.4.1 {
- router-id 10.0.4.118;
- local-address 10.0.4.118;
- local-as 118;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 18;
+ encoder text;
+}
+neighbor 10.0.4.1 {
+ router-id 10.0.4.118;
+ local-address 10.0.4.118;
+ local-as 118;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer19/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer19/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer19/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer19/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer19/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer19/exabgp.cfg
index 9913c226f6..f662ccf93e 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer19/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer19/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 19 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 19";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 19 10;
+ encoder text;
+}
- neighbor 10.0.4.1 {
- router-id 10.0.4.119;
- local-address 10.0.4.119;
- local-as 119;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 19;
+ encoder text;
+}
+neighbor 10.0.4.1 {
+ router-id 10.0.4.119;
+ local-address 10.0.4.119;
+ local-as 119;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer2/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer2/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer2/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer2/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer2/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer2/exabgp.cfg
index 46b436d2af..673d6ec0ee 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer2/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer2/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 2 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 2";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 2 10;
+ encoder text;
+}
- neighbor 10.0.1.1 {
- router-id 10.0.1.102;
- local-address 10.0.1.102;
- local-as 99;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 2;
+ encoder text;
+}
+neighbor 10.0.1.1 {
+ router-id 10.0.1.102;
+ local-address 10.0.1.102;
+ local-as 99;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer20/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer20/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer20/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer20/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer20/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer20/exabgp.cfg
index 17fb816a75..5ea2c91de1 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer20/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer20/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 20 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 20";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 20 10;
+ encoder text;
+}
- neighbor 10.0.4.1 {
- router-id 10.0.4.120;
- local-address 10.0.4.120;
- local-as 120;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 20;
+ encoder text;
+}
+neighbor 10.0.4.1 {
+ router-id 10.0.4.120;
+ local-address 10.0.4.120;
+ local-as 120;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer3/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer3/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer3/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer3/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer3/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer3/exabgp.cfg
index acd57756b9..47a25cab22 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer3/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer3/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 3 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 3";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 3 10;
+ encoder text;
+}
- neighbor 10.0.1.1 {
- router-id 10.0.1.103;
- local-address 10.0.1.103;
- local-as 99;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 3;
+ encoder text;
+}
+neighbor 10.0.1.1 {
+ router-id 10.0.1.103;
+ local-address 10.0.1.103;
+ local-as 99;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer4/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer4/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer4/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer4/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer4/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer4/exabgp.cfg
index 4c9a989b5a..376ac5f37d 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer4/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer4/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 4 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 4";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 4 10;
+ encoder text;
+}
- neighbor 10.0.1.1 {
- router-id 10.0.1.104;
- local-address 10.0.1.104;
- local-as 99;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 4;
+ encoder text;
+}
+neighbor 10.0.1.1 {
+ router-id 10.0.1.104;
+ local-address 10.0.1.104;
+ local-as 99;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer5/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer5/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer5/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer5/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer5/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer5/exabgp.cfg
index eba2aae378..878d728de6 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer5/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer5/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 5 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 5";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 5 10;
+ encoder text;
+}
- neighbor 10.0.1.1 {
- router-id 10.0.1.105;
- local-address 10.0.1.105;
- local-as 99;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 5;
+ encoder text;
+}
+neighbor 10.0.1.1 {
+ router-id 10.0.1.105;
+ local-address 10.0.1.105;
+ local-as 99;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer6/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer6/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer6/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer6/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer6/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer6/exabgp.cfg
index 38b6af0e85..fc702674cf 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer6/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer6/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 6 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 6";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 6 10;
+ encoder text;
+}
- neighbor 10.0.2.1 {
- router-id 10.0.2.106;
- local-address 10.0.2.106;
- local-as 99;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 6;
+ encoder text;
+}
+neighbor 10.0.2.1 {
+ router-id 10.0.2.106;
+ local-address 10.0.2.106;
+ local-as 99;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer7/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer7/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer7/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer7/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer7/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer7/exabgp.cfg
index 7631e43750..09827a8902 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer7/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer7/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 7 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 7";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 7 10;
+ encoder text;
+}
- neighbor 10.0.2.1 {
- router-id 10.0.2.107;
- local-address 10.0.2.107;
- local-as 99;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 7;
+ encoder text;
+}
+neighbor 10.0.2.1 {
+ router-id 10.0.2.107;
+ local-address 10.0.2.107;
+ local-as 99;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer8/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer8/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer8/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer8/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer8/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer8/exabgp.cfg
index 1cd1cd9024..37c01dabb7 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer8/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer8/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 8 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 8";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 8 10;
+ encoder text;
+}
- neighbor 10.0.2.1 {
- router-id 10.0.2.108;
- local-address 10.0.2.108;
- local-as 99;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 8;
+ encoder text;
+}
+neighbor 10.0.2.1 {
+ router-id 10.0.2.108;
+ local-address 10.0.2.108;
+ local-as 99;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/peer9/exa-send.py b/tests/topotests/bgp_ecmp_topo1/peer9/exa-send.py
index 6bef35508f..1a8e6bfe2f 100755
--- a/tests/topotests/bgp_ecmp_topo1/peer9/exa-send.py
+++ b/tests/topotests/bgp_ecmp_topo1/peer9/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_ecmp_topo1/peer9/exabgp.cfg b/tests/topotests/bgp_ecmp_topo1/peer9/exabgp.cfg
index 5771553962..8fb5c58b6b 100644
--- a/tests/topotests/bgp_ecmp_topo1/peer9/exabgp.cfg
+++ b/tests/topotests/bgp_ecmp_topo1/peer9/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 9 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 9";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 9 10;
+ encoder text;
+}
- neighbor 10.0.2.1 {
- router-id 10.0.2.109;
- local-address 10.0.2.109;
- local-as 99;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 9;
+ encoder text;
+}
+neighbor 10.0.2.1 {
+ router-id 10.0.2.109;
+ local-address 10.0.2.109;
+ local-as 99;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_ecmp_topo1/test_bgp_ecmp_topo1.py b/tests/topotests/bgp_ecmp_topo1/test_bgp_ecmp_topo1.py
index 97751ec8cf..7af3f48ff6 100644
--- a/tests/topotests/bgp_ecmp_topo1/test_bgp_ecmp_topo1.py
+++ b/tests/topotests/bgp_ecmp_topo1/test_bgp_ecmp_topo1.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
# SPDX-License-Identifier: ISC
#
diff --git a/tests/topotests/bgp_multiview_topo1/exabgp.env b/tests/topotests/bgp_multiview_topo1/exabgp.env
index a328e04962..ec978c66e7 100644
--- a/tests/topotests/bgp_multiview_topo1/exabgp.env
+++ b/tests/topotests/bgp_multiview_topo1/exabgp.env
@@ -1,5 +1,6 @@
[exabgp.api]
+ack = false
encoder = text
highres = false
respawn = false
diff --git a/tests/topotests/bgp_multiview_topo1/peer1/exa-send.py b/tests/topotests/bgp_multiview_topo1/peer1/exa-send.py
index 09f6ea59e5..0e50d46041 100755
--- a/tests/topotests/bgp_multiview_topo1/peer1/exa-send.py
+++ b/tests/topotests/bgp_multiview_topo1/peer1/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_multiview_topo1/peer1/exabgp.cfg b/tests/topotests/bgp_multiview_topo1/peer1/exabgp.cfg
index 20e71c8420..0303230b56 100644
--- a/tests/topotests/bgp_multiview_topo1/peer1/exabgp.cfg
+++ b/tests/topotests/bgp_multiview_topo1/peer1/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 1 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 1";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 1 10;
+ encoder text;
+}
- neighbor 172.16.1.254 {
- router-id 172.16.1.1;
- local-address 172.16.1.1;
- local-as 65001;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 1;
+ encoder text;
+}
+neighbor 172.16.1.254 {
+ router-id 172.16.1.1;
+ local-address 172.16.1.1;
+ local-as 65001;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_multiview_topo1/peer2/exa-send.py b/tests/topotests/bgp_multiview_topo1/peer2/exa-send.py
index 09f6ea59e5..0e50d46041 100755
--- a/tests/topotests/bgp_multiview_topo1/peer2/exa-send.py
+++ b/tests/topotests/bgp_multiview_topo1/peer2/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_multiview_topo1/peer2/exabgp.cfg b/tests/topotests/bgp_multiview_topo1/peer2/exabgp.cfg
index 1e8eef186f..13670c3b52 100644
--- a/tests/topotests/bgp_multiview_topo1/peer2/exabgp.cfg
+++ b/tests/topotests/bgp_multiview_topo1/peer2/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 2 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 2";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 2 10;
+ encoder text;
+}
- neighbor 172.16.1.254 {
- router-id 172.16.1.2;
- local-address 172.16.1.2;
- local-as 65002;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 2;
+ encoder text;
+}
+neighbor 172.16.1.254 {
+ router-id 172.16.1.2;
+ local-address 172.16.1.2;
+ local-as 65002;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_multiview_topo1/peer3/exa-send.py b/tests/topotests/bgp_multiview_topo1/peer3/exa-send.py
index 09f6ea59e5..0e50d46041 100755
--- a/tests/topotests/bgp_multiview_topo1/peer3/exa-send.py
+++ b/tests/topotests/bgp_multiview_topo1/peer3/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_multiview_topo1/peer3/exabgp.cfg b/tests/topotests/bgp_multiview_topo1/peer3/exabgp.cfg
index ef1b249aeb..0afc484c69 100644
--- a/tests/topotests/bgp_multiview_topo1/peer3/exabgp.cfg
+++ b/tests/topotests/bgp_multiview_topo1/peer3/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 3 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 3";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 3 10;
+ encoder text;
+}
- neighbor 172.16.1.254 {
- router-id 172.16.1.3;
- local-address 172.16.1.3;
- local-as 65003;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 3;
+ encoder text;
+}
+neighbor 172.16.1.254 {
+ router-id 172.16.1.3;
+ local-address 172.16.1.3;
+ local-as 65003;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_multiview_topo1/peer4/exa-send.py b/tests/topotests/bgp_multiview_topo1/peer4/exa-send.py
index 09f6ea59e5..0e50d46041 100755
--- a/tests/topotests/bgp_multiview_topo1/peer4/exa-send.py
+++ b/tests/topotests/bgp_multiview_topo1/peer4/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_multiview_topo1/peer4/exabgp.cfg b/tests/topotests/bgp_multiview_topo1/peer4/exabgp.cfg
index 7c50f73b26..0f5b536d9a 100644
--- a/tests/topotests/bgp_multiview_topo1/peer4/exabgp.cfg
+++ b/tests/topotests/bgp_multiview_topo1/peer4/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 4 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 4";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 4 10;
+ encoder text;
+}
- neighbor 172.16.1.254 {
- router-id 172.16.1.4;
- local-address 172.16.1.4;
- local-as 65004;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 4;
+ encoder text;
+}
+neighbor 172.16.1.254 {
+ router-id 172.16.1.4;
+ local-address 172.16.1.4;
+ local-as 65004;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_multiview_topo1/peer5/exa-send.py b/tests/topotests/bgp_multiview_topo1/peer5/exa-send.py
index 09f6ea59e5..0e50d46041 100755
--- a/tests/topotests/bgp_multiview_topo1/peer5/exa-send.py
+++ b/tests/topotests/bgp_multiview_topo1/peer5/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_multiview_topo1/peer5/exabgp.cfg b/tests/topotests/bgp_multiview_topo1/peer5/exabgp.cfg
index 22163c7fb1..365aa6b8f2 100644
--- a/tests/topotests/bgp_multiview_topo1/peer5/exabgp.cfg
+++ b/tests/topotests/bgp_multiview_topo1/peer5/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 5 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 5";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 5 10;
+ encoder text;
+}
- neighbor 172.16.1.254 {
- router-id 172.16.1.5;
- local-address 172.16.1.5;
- local-as 65005;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 5;
+ encoder text;
+}
+neighbor 172.16.1.254 {
+ router-id 172.16.1.5;
+ local-address 172.16.1.5;
+ local-as 65005;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_multiview_topo1/peer6/exa-send.py b/tests/topotests/bgp_multiview_topo1/peer6/exa-send.py
index 09f6ea59e5..0e50d46041 100755
--- a/tests/topotests/bgp_multiview_topo1/peer6/exa-send.py
+++ b/tests/topotests/bgp_multiview_topo1/peer6/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_multiview_topo1/peer6/exabgp.cfg b/tests/topotests/bgp_multiview_topo1/peer6/exabgp.cfg
index 40b54c33c5..10380334b8 100644
--- a/tests/topotests/bgp_multiview_topo1/peer6/exabgp.cfg
+++ b/tests/topotests/bgp_multiview_topo1/peer6/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 6 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 6";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 6 10;
+ encoder text;
+}
- neighbor 172.16.1.254 {
- router-id 172.16.1.6;
- local-address 172.16.1.6;
- local-as 65006;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 6;
+ encoder text;
+}
+neighbor 172.16.1.254 {
+ router-id 172.16.1.6;
+ local-address 172.16.1.6;
+ local-as 65006;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_multiview_topo1/peer7/exa-send.py b/tests/topotests/bgp_multiview_topo1/peer7/exa-send.py
index 09f6ea59e5..0e50d46041 100755
--- a/tests/topotests/bgp_multiview_topo1/peer7/exa-send.py
+++ b/tests/topotests/bgp_multiview_topo1/peer7/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_multiview_topo1/peer7/exabgp.cfg b/tests/topotests/bgp_multiview_topo1/peer7/exabgp.cfg
index 33312d052f..7411338abd 100644
--- a/tests/topotests/bgp_multiview_topo1/peer7/exabgp.cfg
+++ b/tests/topotests/bgp_multiview_topo1/peer7/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 7 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 7";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 7 10;
+ encoder text;
+}
- neighbor 172.16.1.254 {
- router-id 172.16.1.7;
- local-address 172.16.1.7;
- local-as 65007;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 7;
+ encoder text;
+}
+neighbor 172.16.1.254 {
+ router-id 172.16.1.7;
+ local-address 172.16.1.7;
+ local-as 65007;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_multiview_topo1/peer8/exa-send.py b/tests/topotests/bgp_multiview_topo1/peer8/exa-send.py
index 09f6ea59e5..0e50d46041 100755
--- a/tests/topotests/bgp_multiview_topo1/peer8/exa-send.py
+++ b/tests/topotests/bgp_multiview_topo1/peer8/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_multiview_topo1/peer8/exabgp.cfg b/tests/topotests/bgp_multiview_topo1/peer8/exabgp.cfg
index 173ccb980e..17a4e497e1 100644
--- a/tests/topotests/bgp_multiview_topo1/peer8/exabgp.cfg
+++ b/tests/topotests/bgp_multiview_topo1/peer8/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 8 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 8";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 8 10;
+ encoder text;
+}
- neighbor 172.16.1.254 {
- router-id 172.16.1.8;
- local-address 172.16.1.8;
- local-as 65008;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 8;
+ encoder text;
+}
+neighbor 172.16.1.254 {
+ router-id 172.16.1.8;
+ local-address 172.16.1.8;
+ local-as 65008;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_peer_type_multipath_relax/exabgp.env b/tests/topotests/bgp_peer_type_multipath_relax/exabgp.env
index 6c554f5fa8..989228a293 100644
--- a/tests/topotests/bgp_peer_type_multipath_relax/exabgp.env
+++ b/tests/topotests/bgp_peer_type_multipath_relax/exabgp.env
@@ -1,5 +1,6 @@
[exabgp.api]
+ack = false
encoder = text
highres = false
respawn = false
@@ -43,7 +44,7 @@ enable = false
file = ''
[exabgp.reactor]
-speed = 1.0
+speed = 5.0
[exabgp.tcp]
acl = false
diff --git a/tests/topotests/bgp_peer_type_multipath_relax/peer1/exa_readpipe.py b/tests/topotests/bgp_peer_type_multipath_relax/peer1/exa_readpipe.py
index 0f998c1613..6c1f8b092f 100644
--- a/tests/topotests/bgp_peer_type_multipath_relax/peer1/exa_readpipe.py
+++ b/tests/topotests/bgp_peer_type_multipath_relax/peer1/exa_readpipe.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"Helper script to read api commands from a pipe and feed them to ExaBGP"
import sys
diff --git a/tests/topotests/bgp_peer_type_multipath_relax/peer1/exabgp.cfg b/tests/topotests/bgp_peer_type_multipath_relax/peer1/exabgp.cfg
index 4a7dc48126..e6606d22ff 100644
--- a/tests/topotests/bgp_peer_type_multipath_relax/peer1/exabgp.cfg
+++ b/tests/topotests/bgp_peer_type_multipath_relax/peer1/exabgp.cfg
@@ -1,21 +1,17 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa_readpipe.py /var/run/exabgp_peer1.in";
- encoder text;
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 1";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa_readpipe.py /var/run/exabgp_peer1.in;
+ encoder text;
+}
- neighbor 10.0.1.1 {
- router-id 10.0.1.2;
- local-address 10.0.1.2;
- local-as 64510;
- peer-as 64510;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 1;
+ encoder text;
+}
+neighbor 10.0.1.1 {
+ router-id 10.0.1.2;
+ local-address 10.0.1.2;
+ local-as 64510;
+ peer-as 64510;
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_peer_type_multipath_relax/peer2/exa_readpipe.py b/tests/topotests/bgp_peer_type_multipath_relax/peer2/exa_readpipe.py
index 0f998c1613..6c1f8b092f 100644
--- a/tests/topotests/bgp_peer_type_multipath_relax/peer2/exa_readpipe.py
+++ b/tests/topotests/bgp_peer_type_multipath_relax/peer2/exa_readpipe.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"Helper script to read api commands from a pipe and feed them to ExaBGP"
import sys
diff --git a/tests/topotests/bgp_peer_type_multipath_relax/peer2/exabgp.cfg b/tests/topotests/bgp_peer_type_multipath_relax/peer2/exabgp.cfg
index b53b054550..6a6ba0bb78 100644
--- a/tests/topotests/bgp_peer_type_multipath_relax/peer2/exabgp.cfg
+++ b/tests/topotests/bgp_peer_type_multipath_relax/peer2/exabgp.cfg
@@ -1,21 +1,17 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa_readpipe.py /var/run/exabgp_peer2.in";
- encoder text;
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 2";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa_readpipe.py /var/run/exabgp_peer2.in;
+ encoder text;
+}
- neighbor 10.0.2.1 {
- router-id 10.0.2.2;
- local-address 10.0.2.2;
- local-as 64511;
- peer-as 64511;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 2;
+ encoder text;
+}
+neighbor 10.0.2.1 {
+ router-id 10.0.2.2;
+ local-address 10.0.2.2;
+ local-as 64511;
+ peer-as 64511;
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_peer_type_multipath_relax/peer3/exa_readpipe.py b/tests/topotests/bgp_peer_type_multipath_relax/peer3/exa_readpipe.py
index 0f998c1613..6c1f8b092f 100644
--- a/tests/topotests/bgp_peer_type_multipath_relax/peer3/exa_readpipe.py
+++ b/tests/topotests/bgp_peer_type_multipath_relax/peer3/exa_readpipe.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"Helper script to read api commands from a pipe and feed them to ExaBGP"
import sys
diff --git a/tests/topotests/bgp_peer_type_multipath_relax/peer3/exabgp.cfg b/tests/topotests/bgp_peer_type_multipath_relax/peer3/exabgp.cfg
index 6a1cc2fb3f..9714b1f3b5 100644
--- a/tests/topotests/bgp_peer_type_multipath_relax/peer3/exabgp.cfg
+++ b/tests/topotests/bgp_peer_type_multipath_relax/peer3/exabgp.cfg
@@ -1,21 +1,17 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa_readpipe.py /var/run/exabgp_peer3.in";
- encoder text;
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 3";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa_readpipe.py /var/run/exabgp_peer3.in;
+ encoder text;
+}
- neighbor 10.0.3.1 {
- router-id 10.0.3.2;
- local-address 10.0.3.2;
- local-as 64502;
- peer-as 64501;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 3;
+ encoder text;
+}
+neighbor 10.0.3.1 {
+ router-id 10.0.3.2;
+ local-address 10.0.3.2;
+ local-as 64502;
+ peer-as 64501;
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_peer_type_multipath_relax/peer4/exa_readpipe.py b/tests/topotests/bgp_peer_type_multipath_relax/peer4/exa_readpipe.py
index 0f998c1613..6c1f8b092f 100644
--- a/tests/topotests/bgp_peer_type_multipath_relax/peer4/exa_readpipe.py
+++ b/tests/topotests/bgp_peer_type_multipath_relax/peer4/exa_readpipe.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"Helper script to read api commands from a pipe and feed them to ExaBGP"
import sys
diff --git a/tests/topotests/bgp_peer_type_multipath_relax/peer4/exabgp.cfg b/tests/topotests/bgp_peer_type_multipath_relax/peer4/exabgp.cfg
index 2cc26cb80f..8c38a881ce 100644
--- a/tests/topotests/bgp_peer_type_multipath_relax/peer4/exabgp.cfg
+++ b/tests/topotests/bgp_peer_type_multipath_relax/peer4/exabgp.cfg
@@ -1,21 +1,17 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa_readpipe.py /var/run/exabgp_peer4.in";
- encoder text;
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 4";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa_readpipe.py /var/run/exabgp_peer4.in;
+ encoder text;
+}
- neighbor 10.0.4.1 {
- router-id 10.0.4.2;
- local-address 10.0.4.2;
- local-as 64503;
- peer-as 64501;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 4;
+ encoder text;
+}
+neighbor 10.0.4.1 {
+ router-id 10.0.4.2;
+ local-address 10.0.4.2;
+ local-as 64503;
+ peer-as 64501;
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/bgp_peer_type_multipath_relax/test_bgp_peer-type_multipath-relax.py b/tests/topotests/bgp_peer_type_multipath_relax/test_bgp_peer-type_multipath-relax.py
index ad6674c524..9239be9221 100755
--- a/tests/topotests/bgp_peer_type_multipath_relax/test_bgp_peer-type_multipath-relax.py
+++ b/tests/topotests/bgp_peer_type_multipath_relax/test_bgp_peer-type_multipath-relax.py
@@ -62,6 +62,19 @@ from lib.topolog import logger
pytestmark = [pytest.mark.bgpd, pytest.mark.staticd]
+# Prefixes used in the test
+prefix1 = "203.0.113.0/30"
+prefix2 = "203.0.113.4/30"
+prefix3 = "203.0.113.8/30"
+# Next hops used for iBGP/confed routes
+resolved_nh1 = "198.51.100.1"
+resolved_nh2 = "198.51.100.2"
+# BGP route used for recursive resolution
+bgp_resolving_prefix = "198.51.100.0/24"
+# Next hop that will require non-connected recursive resolution
+ebgp_resolved_nh = "198.51.100.10"
+
+
def build_topo(tgen):
"Build function"
@@ -125,36 +138,26 @@ def teardown_module(mod):
tgen.stop_topology()
-def test_bgp_peer_type_multipath_relax():
+def exabgp_cmd(peer, cmd):
+ pipe = open("/run/exabgp_{}.in".format(peer), "w")
+ with pipe:
+ pipe.write(cmd)
+ pipe.close()
+
+
+def test_bgp_peer_type_multipath_relax_test1():
tgen = get_topogen()
# Don't run this test if we have any failure.
if tgen.routers_have_failure():
pytest.skip(tgen.errors)
- def exabgp_cmd(peer, cmd):
- pipe = open("/run/exabgp_{}.in".format(peer), "w")
- with pipe:
- pipe.write(cmd)
- pipe.close()
-
- # Prefixes used in the test
- prefix1 = "203.0.113.0/30"
- prefix2 = "203.0.113.4/30"
- prefix3 = "203.0.113.8/30"
- # Next hops used for iBGP/confed routes
- resolved_nh1 = "198.51.100.1"
- resolved_nh2 = "198.51.100.2"
- # BGP route used for recursive resolution
- bgp_resolving_prefix = "198.51.100.0/24"
- # Next hop that will require non-connected recursive resolution
- ebgp_resolved_nh = "198.51.100.10"
+ r1 = tgen.gears["r1"]
# Send a non-connected route to resolve others
exabgp_cmd(
"peer3", "announce route {} next-hop self\n".format(bgp_resolving_prefix)
)
- router = tgen.gears["r1"]
# It seems that if you write to the exabgp socket too quickly in
# succession, requests get lost. So verify prefix1 now instead of
@@ -177,7 +180,7 @@ def test_bgp_peer_type_multipath_relax():
expected = json.loads(open(reffile).read())
test_func = functools.partial(
topotest.router_json_cmp,
- router,
+ r1,
"show ip bgp {} json".format(prefix1),
expected,
)
@@ -185,6 +188,16 @@ def test_bgp_peer_type_multipath_relax():
assertMsg = "Mixed-type multipath not found"
assert res is None, assertMsg
+
+def test_bgp_peer_type_multipath_relax_test2():
+ tgen = get_topogen()
+
+ # Don't run this test if we have any failure.
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
+ r1 = tgen.gears["r1"]
+
logger.info("Create and verify eBGP and iBGP+confed multipaths")
exabgp_cmd(
"peer1",
@@ -203,38 +216,66 @@ def test_bgp_peer_type_multipath_relax():
reffile = os.path.join(CWD, "r1/multipath.json")
expected = json.loads(open(reffile).read())
test_func = functools.partial(
- topotest.router_json_cmp, router, "show ip bgp json", expected
+ topotest.router_json_cmp, r1, "show ip bgp json", expected
)
_, res = topotest.run_and_expect(test_func, None, count=10, wait=1)
assertMsg = "Not all expected multipaths found"
assert res is None, assertMsg
+
+def test_bgp_peer_type_multipath_relax_test3():
+ tgen = get_topogen()
+
+ # Don't run this test if we have any failure.
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
+ r1 = tgen.gears["r1"]
+
logger.info("Toggle peer-type multipath-relax and verify the changes")
- router.vtysh_cmd(
+ r1.vtysh_cmd(
"conf\n router bgp 64510\n no bgp bestpath peer-type multipath-relax\n"
)
# This file verifies "multipath" is not set
reffile = os.path.join(CWD, "r1/not-multipath.json")
expected = json.loads(open(reffile).read())
test_func = functools.partial(
- topotest.router_json_cmp, router, "show ip bgp json", expected
+ topotest.router_json_cmp, r1, "show ip bgp json", expected
)
_, res = topotest.run_and_expect(test_func, None, count=10, wait=1)
assertMsg = "Disabling peer-type multipath-relax did not take effect"
assert res is None, assertMsg
- router.vtysh_cmd(
- "conf\n router bgp 64510\n bgp bestpath peer-type multipath-relax\n"
- )
+
+def test_bgp_peer_type_multipath_relax_test4():
+ tgen = get_topogen()
+
+ # Don't run this test if we have any failure.
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
+ r1 = tgen.gears["r1"]
+
+ r1.vtysh_cmd("conf\n router bgp 64510\n bgp bestpath peer-type multipath-relax\n")
reffile = os.path.join(CWD, "r1/multipath.json")
expected = json.loads(open(reffile).read())
test_func = functools.partial(
- topotest.router_json_cmp, router, "show ip bgp json", expected
+ topotest.router_json_cmp, r1, "show ip bgp json", expected
)
_, res = topotest.run_and_expect(test_func, None, count=10, wait=1)
assertMsg = "Reenabling peer-type multipath-relax did not take effect"
assert res is None, assertMsg
+
+def test_bgp_peer_type_multipath_relax_test5():
+ tgen = get_topogen()
+
+ # Don't run this test if we have any failure.
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
+ r1 = tgen.gears["r1"]
+
logger.info("Check recursive resolution of eBGP next hops is not affected")
# eBGP next hop resolution rejects recursively resolved next hops by
# default, even with peer-type multipath-relax
@@ -245,7 +286,7 @@ def test_bgp_peer_type_multipath_relax():
expected = json.loads(open(reffile).read())
test_func = functools.partial(
topotest.router_json_cmp,
- router,
+ r1,
"show ip bgp {} json".format(prefix3),
expected,
)
@@ -253,6 +294,16 @@ def test_bgp_peer_type_multipath_relax():
assertMsg = "Recursive eBGP next hop not as expected for {}".format(prefix3)
assert res is None, assertMsg
+
+def test_bgp_peer_type_multipath_relax_test6():
+ tgen = get_topogen()
+
+ # Don't run this test if we have any failure.
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
+ r1 = tgen.gears["r1"]
+
exabgp_cmd(
"peer4", "announce route {} next-hop {}\n".format(prefix1, ebgp_resolved_nh)
)
@@ -260,7 +311,7 @@ def test_bgp_peer_type_multipath_relax():
expected = json.loads(open(reffile).read())
test_func = functools.partial(
topotest.router_json_cmp,
- router,
+ r1,
"show ip bgp {} json".format(prefix1),
expected,
)
@@ -268,14 +319,24 @@ def test_bgp_peer_type_multipath_relax():
assertMsg = "Recursive eBGP next hop not as expected for {}".format(prefix1)
assert res is None, assertMsg
+
+def test_bgp_peer_type_multipath_relax_test7():
+ tgen = get_topogen()
+
+ # Don't run this test if we have any failure.
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
+ r1 = tgen.gears["r1"]
+
# When other config allows recursively resolved eBGP next hops,
# such next hops in all-eBGP multipaths should be valid
- router.vtysh_cmd("conf\n router bgp 64510\n neighbor 10.0.4.2 ebgp-multihop\n")
+ r1.vtysh_cmd("conf\n router bgp 64510\n neighbor 10.0.4.2 ebgp-multihop\n")
reffile = os.path.join(CWD, "r1/prefix3-recursive.json")
expected = json.loads(open(reffile).read())
test_func = functools.partial(
topotest.router_json_cmp,
- router,
+ r1,
"show ip bgp {} json".format(prefix3),
expected,
)
@@ -287,7 +348,7 @@ def test_bgp_peer_type_multipath_relax():
expected = json.loads(open(reffile).read())
test_func = functools.partial(
topotest.router_json_cmp,
- router,
+ r1,
"show ip bgp {} json".format(prefix1),
expected,
)
@@ -295,6 +356,16 @@ def test_bgp_peer_type_multipath_relax():
assertMsg = "Recursive eBGP next hop not as expected for {}".format(prefix1)
assert res is None, assertMsg
+
+def test_bgp_peer_type_multipath_relax_test8():
+ tgen = get_topogen()
+
+ # Don't run this test if we have any failure.
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
+ r1 = tgen.gears["r1"]
+
logger.info("Check mixed-type multipath next hop recursive resolution in FIB")
# There are now two eBGP-learned routes with a recursively resolved next;
# hop; one is all-eBGP multipath, and the other is iBGP/eBGP/
@@ -305,7 +376,7 @@ def test_bgp_peer_type_multipath_relax():
expected = json.loads(open(reffile).read())
test_func = functools.partial(
topotest.router_json_cmp,
- router,
+ r1,
"show ip route {} json".format(prefix3),
expected,
)
@@ -313,6 +384,16 @@ def test_bgp_peer_type_multipath_relax():
assertMsg = "FIB next hops mismatch for all-eBGP multipath"
assert res is None, assertMsg
+
+def test_bgp_peer_type_multipath_relax_test9():
+ tgen = get_topogen()
+
+ # Don't run this test if we have any failure.
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
+ r1 = tgen.gears["r1"]
+
# check confed-external enables recursively resolved next hops by itself
exabgp_cmd(
"peer1",
@@ -324,7 +405,7 @@ def test_bgp_peer_type_multipath_relax():
expected = json.loads(open(reffile).read())
test_func = functools.partial(
topotest.router_json_cmp,
- router,
+ r1,
"show ip route {} json".format(prefix1),
expected,
)
@@ -332,6 +413,16 @@ def test_bgp_peer_type_multipath_relax():
assertMsg = "FIB next hops mismatch for eBGP+confed-external multipath"
assert res is None, assertMsg
+
+def test_bgp_peer_type_multipath_relax_test10():
+ tgen = get_topogen()
+
+ # Don't run this test if we have any failure.
+ if tgen.routers_have_failure():
+ pytest.skip(tgen.errors)
+
+ r1 = tgen.gears["r1"]
+
# check iBGP by itself
exabgp_cmd(
"peer1",
@@ -349,7 +440,7 @@ def test_bgp_peer_type_multipath_relax():
expected = json.loads(open(reffile).read())
test_func = functools.partial(
topotest.router_json_cmp,
- router,
+ r1,
"show ip route {} json".format(prefix1),
expected,
)
diff --git a/tests/topotests/bgp_prefix_sid/exabgp.env b/tests/topotests/bgp_prefix_sid/exabgp.env
index 6c554f5fa8..bb36af522a 100644
--- a/tests/topotests/bgp_prefix_sid/exabgp.env
+++ b/tests/topotests/bgp_prefix_sid/exabgp.env
@@ -1,5 +1,6 @@
[exabgp.api]
+ack = false
encoder = text
highres = false
respawn = false
diff --git a/tests/topotests/bgp_prefix_sid/peer1/exabgp.cfg b/tests/topotests/bgp_prefix_sid/peer1/exabgp.cfg
index 5b55366a0e..a5108ff0da 100644
--- a/tests/topotests/bgp_prefix_sid/peer1/exabgp.cfg
+++ b/tests/topotests/bgp_prefix_sid/peer1/exabgp.cfg
@@ -1,103 +1,101 @@
-group controller {
- neighbor 10.0.0.1 {
- router-id 10.0.0.101;
- local-address 10.0.0.101;
- local-as 2;
- peer-as 1;
+neighbor 10.0.0.1 {
+ router-id 10.0.0.101;
+ local-address 10.0.0.101;
+ local-as 2;
+ peer-as 1;
- family {
- ipv4 nlri-mpls;
- }
+ family {
+ ipv4 nlri-mpls;
+ }
- static {
- # ref: draft-ietf-idr-bgp-prefix-sid-27
- #
- # IANA temporarily assigned the following:
- # attribute code type (suggested value: 40) to
- # the BGP Prefix-SID attribute
- #
- # 0 1 2 3
- # 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- # | Type | Length | RESERVED |
- # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- # | Flags | Label Index |
- # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- # | Label Index |
- # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- # Figure. Label-Index TLV (Prefix-SID type-1)
- #
- # 0 1 2 3
- # 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- # | Type | Length | Flags |
- # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- # | Flags |
- # +-+-+-+-+-+-+-+-+
- #
- # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- # | SRGB 1 (6 octets) |
- # | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- # | |
- # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- #
- # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- # | SRGB n (6 octets) |
- # | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- # | |
- # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<Paste>
- # Figure. Originator SRGB TLV (Prefix-SID type-3)
+ static {
+ # ref: draft-ietf-idr-bgp-prefix-sid-27
+ #
+ # IANA temporarily assigned the following:
+ # attribute code type (suggested value: 40) to
+ # the BGP Prefix-SID attribute
+ #
+ # 0 1 2 3
+ # 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ # | Type | Length | RESERVED |
+ # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ # | Flags | Label Index |
+ # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ # | Label Index |
+ # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ # Figure. Label-Index TLV (Prefix-SID type-1)
+ #
+ # 0 1 2 3
+ # 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ # | Type | Length | Flags |
+ # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ # | Flags |
+ # +-+-+-+-+-+-+-+-+
+ #
+ # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ # | SRGB 1 (6 octets) |
+ # | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ # | |
+ # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ #
+ # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ # | SRGB n (6 octets) |
+ # | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ # | |
+ # +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<Paste>
+ # Figure. Originator SRGB TLV (Prefix-SID type-3)
- # ExaBGP generic-attribute binary pattern:
- # Attribute-type: 0x28 (40:BGP_PREFIX_SID)
- # Attribute-flag: 0xc0 (Option, Transitive)
- # Attribute-body: Label-Index TLV and Originator SRGB TLV
- # Label-Index TLV: 0x01000700000000000001
- # Type (08bit): 0x01
- # Length (16bit): 0x0007
- # RESERVED (08bit): 0x00
- # Flags (16bit): 0x0000
- # Label Index (32bit): 0x00000001
- # Originator SRGB TLV: 0x03000800000c350000000a
- # Type (08bit): 0x03
- # Length (16bit): 0x0008 (nb-SRGB is 1)
- # Flags (16bit): 0x0000
- # SRGB1 (48bit): 0x0c3500:0x00000a (800000-800010 is SRGB1)
- route 3.0.0.1/32 next-hop 10.0.0.101 label [800001] attribute [0x28 0xc0 0x0100070000000000000103000800000c350000000a];
+ # ExaBGP generic-attribute binary pattern:
+ # Attribute-type: 0x28 (40:BGP_PREFIX_SID)
+ # Attribute-flag: 0xc0 (Option, Transitive)
+ # Attribute-body: Label-Index TLV and Originator SRGB TLV
+ # Label-Index TLV: 0x01000700000000000001
+ # Type (08bit): 0x01
+ # Length (16bit): 0x0007
+ # RESERVED (08bit): 0x00
+ # Flags (16bit): 0x0000
+ # Label Index (32bit): 0x00000001
+ # Originator SRGB TLV: 0x03000800000c350000000a
+ # Type (08bit): 0x03
+ # Length (16bit): 0x0008 (nb-SRGB is 1)
+ # Flags (16bit): 0x0000
+ # SRGB1 (48bit): 0x0c3500:0x00000a (800000-800010 is SRGB1)
+ route 3.0.0.1/32 next-hop 10.0.0.101 label [800001] attribute [0x28 0xc0 0x0100070000000000000103000800000c350000000a];
- # ExaBGP generic-attribute binary pattern:
- # Attribute-type: 0x28 (40:BGP_PREFIX_SID)
- # Attribute-flag: 0xc0 (Option, Transitive)
- # Attribute-body: Label-Index TLV and Originator SRGB TLV
- # Label-Index TLV: 0x01000700000000000001
- # Type (08bit): 0x01
- # Length (16bit): 0x0007
- # RESERVED (08bit): 0x00
- # Flags (16bit): 0x0000
- # Label Index (32bit): 0x00000002
- # Originator SRGB TLV: 0x03000800000c350000000a
- # Type (08bit): 0x03
- # Length (16bit): 0x0008 (nb-SRGB is 1)
- # Flags (16bit): 0x0000
- # SRGB1 (48bit): 0x0c3500:0x00000a (800000-800010 is SRGB1)
- route 3.0.0.2/32 next-hop 10.0.0.101 label [800002] attribute [0x28 0xc0 0x0100070000000000000203000800000c350000000a];
+ # ExaBGP generic-attribute binary pattern:
+ # Attribute-type: 0x28 (40:BGP_PREFIX_SID)
+ # Attribute-flag: 0xc0 (Option, Transitive)
+ # Attribute-body: Label-Index TLV and Originator SRGB TLV
+ # Label-Index TLV: 0x01000700000000000001
+ # Type (08bit): 0x01
+ # Length (16bit): 0x0007
+ # RESERVED (08bit): 0x00
+ # Flags (16bit): 0x0000
+ # Label Index (32bit): 0x00000002
+ # Originator SRGB TLV: 0x03000800000c350000000a
+ # Type (08bit): 0x03
+ # Length (16bit): 0x0008 (nb-SRGB is 1)
+ # Flags (16bit): 0x0000
+ # SRGB1 (48bit): 0x0c3500:0x00000a (800000-800010 is SRGB1)
+ route 3.0.0.2/32 next-hop 10.0.0.101 label [800002] attribute [0x28 0xc0 0x0100070000000000000203000800000c350000000a];
- # ExaBGP generic-attribute binary pattern:
- # Attribute-type: 0x28 (40:BGP_PREFIX_SID)
- # Attribute-flag: 0xc0 (Option, Transitive)
- # Attribute-body: Label-Index TLV and Originator SRGB TLV
- # Label-Index TLV: 0x01000700000000000001
- # Type (08bit): 0x01
- # Length (16bit): 0x0007
- # RESERVED (08bit): 0x00
- # Flags (16bit): 0x0000
- # Label Index (32bit): 0x00000003
- # Originator SRGB TLV: 0x03000800000c350000000a
- # Type (08bit): 0x03
- # Length (16bit): 0x0008 (nb-SRGB is 1)
- # Flags (16bit): 0x0000
- # SRGB1 (48bit): 0x0c3500:0x00000a (800000-800010 is SRGB1)
- route 3.0.0.3/32 next-hop 10.0.0.101 label [800003] attribute [0x28 0xc0 0x0100070000000000000303000800000c350000000a];
- }
+ # ExaBGP generic-attribute binary pattern:
+ # Attribute-type: 0x28 (40:BGP_PREFIX_SID)
+ # Attribute-flag: 0xc0 (Option, Transitive)
+ # Attribute-body: Label-Index TLV and Originator SRGB TLV
+ # Label-Index TLV: 0x01000700000000000001
+ # Type (08bit): 0x01
+ # Length (16bit): 0x0007
+ # RESERVED (08bit): 0x00
+ # Flags (16bit): 0x0000
+ # Label Index (32bit): 0x00000003
+ # Originator SRGB TLV: 0x03000800000c350000000a
+ # Type (08bit): 0x03
+ # Length (16bit): 0x0008 (nb-SRGB is 1)
+ # Flags (16bit): 0x0000
+ # SRGB1 (48bit): 0x0c3500:0x00000a (800000-800010 is SRGB1)
+ route 3.0.0.3/32 next-hop 10.0.0.101 label [800003] attribute [0x28 0xc0 0x0100070000000000000303000800000c350000000a];
}
}
diff --git a/tests/topotests/bgp_prefix_sid/peer2/exabgp.cfg b/tests/topotests/bgp_prefix_sid/peer2/exabgp.cfg
index 379d0a3f43..50ebdc2319 100644
--- a/tests/topotests/bgp_prefix_sid/peer2/exabgp.cfg
+++ b/tests/topotests/bgp_prefix_sid/peer2/exabgp.cfg
@@ -1,19 +1,22 @@
-group controller {
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py --no-timestamp 2";
- receive-routes;
- encoder json;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py --no-timestamp 2;
+ encoder json;
+}
- neighbor 10.0.0.1 {
- router-id 10.0.0.102;
- local-address 10.0.0.102;
- local-as 3;
- peer-as 1;
+neighbor 10.0.0.1 {
+ router-id 10.0.0.102;
+ local-address 10.0.0.102;
+ local-as 3;
+ peer-as 1;
- family {
- ipv4 nlri-mpls;
+ family {
+ ipv4 nlri-mpls;
+ }
+ api {
+ processes [ receive-routes ];
+ receive {
+ parsed;
+ update;
}
}
}
diff --git a/tests/topotests/bgp_prefix_sid/test_bgp_prefix_sid.py b/tests/topotests/bgp_prefix_sid/test_bgp_prefix_sid.py
index bfc083b506..1e6e731a18 100644
--- a/tests/topotests/bgp_prefix_sid/test_bgp_prefix_sid.py
+++ b/tests/topotests/bgp_prefix_sid/test_bgp_prefix_sid.py
@@ -120,13 +120,9 @@ def exabgp_get_update_prefix(filename, afi, nexthop, prefix):
ret = ret.get(afi)
if ret is None:
continue
- ret = ret.get(nexthop)
- if ret is None:
- continue
- ret = ret.get(prefix)
- if ret is None:
- continue
- return output
+ for nh in ret.get(nexthop, []):
+ if nh.get("nlri") == prefix:
+ return output
return "Not found"
@@ -135,33 +131,39 @@ def test_peer2_receive_prefix_sid_type1():
peer2 = tgen.gears["peer2"]
logfile = "{}/{}-received.log".format(peer2.gearlogdir, peer2.name)
- def _check_type1_peer2(prefix, labelindex):
+ def _check_type1_peer2(prefix, label):
output = exabgp_get_update_prefix(
logfile, "ipv4 nlri-mpls", "10.0.0.101", prefix
)
expected = {
"type": "update",
"neighbor": {
- "ip": "10.0.0.1",
+ "address": {
+ "peer": "10.0.0.1",
+ },
"message": {
"update": {
- "attribute": {
- "attribute-0x28-0xE0": "0x010007000000{:08x}".format(
- labelindex
- )
+ "announce": {
+ "ipv4 nlri-mpls": {
+ "10.0.0.101": [
+ {
+ "nlri": prefix,
+ "label": [[label]],
+ }
+ ]
+ }
},
- "announce": {"ipv4 nlri-mpls": {"10.0.0.101": {}}},
}
},
},
}
return topotest.json_cmp(output, expected)
- test_func = functools.partial(_check_type1_peer2, "3.0.0.1/32", labelindex=1)
+ test_func = functools.partial(_check_type1_peer2, "3.0.0.1/32", label=8001)
success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert result is None, 'Failed _check_type1_peer2 in "{}"'.format("peer2")
- test_func = functools.partial(_check_type1_peer2, "3.0.0.2/32", labelindex=2)
+ test_func = functools.partial(_check_type1_peer2, "3.0.0.2/32", label=8002)
success, result = topotest.run_and_expect(test_func, None, count=10, wait=0.5)
assert result is None, 'Failed _check_type1_peer2 in "{}"'.format("peer2")
diff --git a/tests/topotests/bgp_prefix_sid2/peer1/exabgp.cfg b/tests/topotests/bgp_prefix_sid2/peer1/exabgp.cfg
index 3819179570..7a291a3421 100644
--- a/tests/topotests/bgp_prefix_sid2/peer1/exabgp.cfg
+++ b/tests/topotests/bgp_prefix_sid2/peer1/exabgp.cfg
@@ -1,29 +1,27 @@
-group controller {
- neighbor 10.0.0.1 {
- router-id 10.0.0.101;
- local-address 10.0.0.101;
- local-as 2;
- peer-as 1;
+neighbor 10.0.0.1 {
+ router-id 10.0.0.101;
+ local-address 10.0.0.101;
+ local-as 2;
+ peer-as 1;
- family {
- ipv6 mpls-vpn;
- }
+ family {
+ ipv6 mpls-vpn;
+ }
- static {
- route 2001:1::/64 {
- rd 2:10;
- next-hop 2001::2;
- extended-community [ target:2:10 ];
- label 3;
- attribute [0x28 0xc0 0x050019000100150020010db800010001000000000000000100ffff00 ];
- }
- route 2001:2::/64 {
- rd 2:10;
- next-hop 2001::2;
- extended-community [ target:2:10 ];
- label 3;
- attribute [0x28 0xc0 0x050019000100150020010db800010001000000000000000100ffff00 ];
- }
+ static {
+ route 2001:1::/64 {
+ rd 2:10;
+ next-hop 2001::2;
+ extended-community [ target:2:10 ];
+ label 3;
+ attribute [0x28 0xc0 0x050019000100150020010db800010001000000000000000100ffff00 ];
+ }
+ route 2001:2::/64 {
+ rd 2:10;
+ next-hop 2001::2;
+ extended-community [ target:2:10 ];
+ label 3;
+ attribute [0x28 0xc0 0x050019000100150020010db800010001000000000000000100ffff00 ];
}
}
}
diff --git a/tests/topotests/bgp_prefix_sid2/r1/bgpd.conf b/tests/topotests/bgp_prefix_sid2/r1/bgpd.conf
index 55b8f5536c..b3ca0e114d 100644
--- a/tests/topotests/bgp_prefix_sid2/r1/bgpd.conf
+++ b/tests/topotests/bgp_prefix_sid2/r1/bgpd.conf
@@ -21,5 +21,7 @@ router bgp 1
!
address-family ipv6 vpn
neighbor 10.0.0.101 activate
+ neighbor 10.0.0.101 route-map DENY_ALL out
exit-address-family
!
+route-map DENY_ALL deny 10
diff --git a/tests/topotests/bgp_prefix_sid2/r1/vpnv6_rib_entry1.json b/tests/topotests/bgp_prefix_sid2/r1/vpnv6_rib_entry1.json
index 42293b1fc7..65c51f1c8c 100644
--- a/tests/topotests/bgp_prefix_sid2/r1/vpnv6_rib_entry1.json
+++ b/tests/topotests/bgp_prefix_sid2/r1/vpnv6_rib_entry1.json
@@ -1,10 +1,6 @@
{
"2:10":{
"prefix":"2001:1::\/64",
- "advertisedTo":{
- "10.0.0.101":{
- }
- },
"paths":[
{
"aspath":{
diff --git a/tests/topotests/bgp_prefix_sid2/r1/vpnv6_rib_entry2.json b/tests/topotests/bgp_prefix_sid2/r1/vpnv6_rib_entry2.json
index c9ad8714c1..4a12c2a880 100644
--- a/tests/topotests/bgp_prefix_sid2/r1/vpnv6_rib_entry2.json
+++ b/tests/topotests/bgp_prefix_sid2/r1/vpnv6_rib_entry2.json
@@ -1,10 +1,6 @@
{
"2:10":{
"prefix":"2001:2::\/64",
- "advertisedTo":{
- "10.0.0.101":{
- }
- },
"paths":[
{
"aspath":{
diff --git a/tests/topotests/bgp_vrf_md5_peering/peer1/exabgp.cfg b/tests/topotests/bgp_vrf_md5_peering/peer1/exabgp.cfg
index 3260513903..11a827a904 100644
--- a/tests/topotests/bgp_vrf_md5_peering/peer1/exabgp.cfg
+++ b/tests/topotests/bgp_vrf_md5_peering/peer1/exabgp.cfg
@@ -3,7 +3,7 @@ neighbor 10.0.0.1 {
local-address 10.0.0.2;
local-as 65001;
peer-as 65534;
- md5 test123;
+ md5-password test123;
static {
route 192.168.100.1/32 {
diff --git a/tests/topotests/bgp_vrf_netns/exabgp.env b/tests/topotests/bgp_vrf_netns/exabgp.env
index a328e04962..ec978c66e7 100644
--- a/tests/topotests/bgp_vrf_netns/exabgp.env
+++ b/tests/topotests/bgp_vrf_netns/exabgp.env
@@ -1,5 +1,6 @@
[exabgp.api]
+ack = false
encoder = text
highres = false
respawn = false
diff --git a/tests/topotests/bgp_vrf_netns/peer1/exa-send.py b/tests/topotests/bgp_vrf_netns/peer1/exa-send.py
index ab0eb8ce8f..c6a4499bd3 100755
--- a/tests/topotests/bgp_vrf_netns/peer1/exa-send.py
+++ b/tests/topotests/bgp_vrf_netns/peer1/exa-send.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
"""
exa-send.py: Send a few testroutes with ExaBGP
diff --git a/tests/topotests/bgp_vrf_netns/peer1/exabgp.cfg b/tests/topotests/bgp_vrf_netns/peer1/exabgp.cfg
index 2d0ca89f0f..97a024ce96 100644
--- a/tests/topotests/bgp_vrf_netns/peer1/exabgp.cfg
+++ b/tests/topotests/bgp_vrf_netns/peer1/exabgp.cfg
@@ -1,21 +1,18 @@
-group controller {
-
- process announce-routes {
- run "/etc/exabgp/exa-send.py 1 10";
- }
-
- process receive-routes {
- run "/etc/exabgp/exa-receive.py 1";
- receive-routes;
- encoder text;
- }
+process announce-routes {
+ run /etc/exabgp/exa-send.py 1 10;
+ encoder text;
+}
- neighbor 10.0.1.1 {
- router-id 10.0.1.101;
- local-address 10.0.1.101;
- local-as 99;
- peer-as 100;
- graceful-restart;
- }
+process receive-routes {
+ run /etc/exabgp/exa-receive.py 1;
+ encoder text;
+}
+neighbor 10.0.1.1 {
+ router-id 10.0.1.101;
+ local-address 10.0.1.101;
+ local-as 99;
+ peer-as 100;
+ capability {graceful-restart;}
+ api {processes [ announce-routes, receive-routes ];}
}
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py
index e19d96f918..598db84e63 100644
--- a/tests/topotests/lib/common_config.py
+++ b/tests/topotests/lib/common_config.py
@@ -14,6 +14,7 @@ import socket
import subprocess
import sys
import traceback
+import configparser
from collections import OrderedDict
from copy import deepcopy
from datetime import datetime, timedelta
@@ -21,12 +22,6 @@ from functools import wraps
from re import search as re_search
from time import sleep
-try:
- # Imports from python2
- import ConfigParser as configparser
-except ImportError:
- # Imports from python3
- import configparser
from lib.micronet import comm_error
from lib.topogen import TopoRouter, get_topogen
diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py
index 48caf6f03a..7b06f3d127 100644
--- a/tests/topotests/lib/topogen.py
+++ b/tests/topotests/lib/topogen.py
@@ -81,20 +81,20 @@ def is_string(value):
def get_exabgp_cmd(commander=None):
- """Return the command to use for ExaBGP version < 4."""
+ """Return the command to use for ExaBGP version >= 4.2.11"""
if commander is None:
commander = Commander("exabgp", logger=logging.getLogger("exabgp"))
def exacmd_version_ok(exacmd):
- logger.debug("checking %s for exabgp < version 4", exacmd)
+ logger.debug("checking %s for exabgp version >= 4.2.11", exacmd)
_, stdout, _ = commander.cmd_status(exacmd + " -v", warn=False)
m = re.search(r"ExaBGP\s*:\s*((\d+)\.(\d+)(?:\.(\d+))?)", stdout)
if not m:
return False
version = m.group(1)
- if topotest.version_cmp(version, "4") >= 0:
- logging.debug("found exabgp version >= 4 in %s will keep looking", exacmd)
+ if topotest.version_cmp(version, "4.2.11") < 0:
+ logging.debug("found exabgp version < 4.2.11 in %s will keep looking", exacmd)
return False
logger.info("Using ExaBGP version %s in %s", version, exacmd)
return True
@@ -102,14 +102,14 @@ def get_exabgp_cmd(commander=None):
exacmd = commander.get_exec_path("exabgp")
if exacmd and exacmd_version_ok(exacmd):
return exacmd
- py2_path = commander.get_exec_path("python2")
- if py2_path:
- exacmd = py2_path + " -m exabgp"
+ py3_path = commander.get_exec_path("python3")
+ if py3_path:
+ exacmd = py3_path + " -m exabgp"
if exacmd_version_ok(exacmd):
return exacmd
- py2_path = commander.get_exec_path("python")
- if py2_path:
- exacmd = py2_path + " -m exabgp"
+ py3_path = commander.get_exec_path("python")
+ if py3_path:
+ exacmd = py3_path + " -m exabgp"
if exacmd_version_ok(exacmd):
return exacmd
return None
@@ -1198,7 +1198,7 @@ class TopoExaBGP(TopoHost):
* Run ExaBGP with env file `env_file` and configuration peer*/exabgp.cfg
"""
exacmd = self.tgen.get_exabgp_cmd()
- assert exacmd, "Can't find a usabel ExaBGP (must be < version 4)"
+ assert exacmd, "Can't find a usable ExaBGP (must be version >= 4.2.11)"
self.run("mkdir -p /etc/exabgp")
self.run("chmod 755 /etc/exabgp")
@@ -1209,8 +1209,22 @@ class TopoExaBGP(TopoHost):
self.run("chmod 644 /etc/exabgp/*")
self.run("chmod a+x /etc/exabgp/*.py")
self.run("chown -R exabgp:exabgp /etc/exabgp")
+ self.run("[ -p /var/run/exabgp.in ] || mkfifo /var/run/exabgp.in")
+ self.run("[ -p /var/run/exabgp.out ] || mkfifo /var/run/exabgp.out")
+ self.run("chown exabgp:exabgp /var/run/exabgp.{in,out}")
+ self.run("chmod 600 /var/run/exabgp.{in,out}")
- output = self.run(exacmd + " -e /etc/exabgp/exabgp.env /etc/exabgp/exabgp.cfg")
+ log_dir = os.path.join(self.logdir, self.name)
+ self.run("chmod 777 {}".format(log_dir))
+
+ log_file = os.path.join(log_dir, "exabgp.log")
+
+ env_cmd = "env exabgp.log.level=INFO "
+ env_cmd += "exabgp.log.destination={} ".format(log_file)
+
+ output = self.run(
+ env_cmd + exacmd + " -e /etc/exabgp/exabgp.env /etc/exabgp/exabgp.cfg "
+ )
if output is None or len(output) == 0:
output = "<none>"
@@ -1371,7 +1385,7 @@ def diagnose_env_linux(rundir):
logger.info("LDPd tests will not run (missing mpls-iptunnel kernel module)")
if not get_exabgp_cmd():
- logger.warning("Failed to find exabgp < 4")
+ logger.warning("Failed to find exabgp >= 4.2.11")
logger.removeHandler(fhandler)
fhandler.close()
diff --git a/tests/topotests/pytest.ini b/tests/topotests/pytest.ini
index 6c2d42ef40..d61a0a1ee1 100644
--- a/tests/topotests/pytest.ini
+++ b/tests/topotests/pytest.ini
@@ -1,6 +1,8 @@
# Skip pytests example directory
[pytest]
+# NEEDS_EXABGP_4_2_11_FRR
+
# asyncio_mode = auto
# We always turn this on inside conftest.py, default shown