summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2024-11-18 21:38:45 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2024-12-02 18:44:50 +0100
commit1ea8ba59028e482173e8c540a306155bd39a5430 (patch)
treeb82be496b9fcbbdb0763afc2100f3e25d730a3a2
parenttopotests: fix bmp_collector handling of empty as-path (diff)
downloadfrr-1ea8ba59028e482173e8c540a306155bd39a5430.tar.xz
frr-1ea8ba59028e482173e8c540a306155bd39a5430.zip
topotests: bgp_bmp, use unified configuration
Use unified configuration procedure. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
-rw-r--r--tests/topotests/bgp_bmp/r1/frr.conf (renamed from tests/topotests/bgp_bmp/r1/bgpd.conf)9
-rw-r--r--tests/topotests/bgp_bmp/r1/zebra.conf7
-rw-r--r--tests/topotests/bgp_bmp/r1vrf/frr.conf (renamed from tests/topotests/bgp_bmp/r1vrf/bgpd.conf)8
-rw-r--r--tests/topotests/bgp_bmp/r1vrf/zebra.conf7
-rw-r--r--tests/topotests/bgp_bmp/r2/frr.conf (renamed from tests/topotests/bgp_bmp/r2/bgpd.conf)8
-rw-r--r--tests/topotests/bgp_bmp/r2/zebra.conf8
-rw-r--r--tests/topotests/bgp_bmp/r2vrf/frr.conf (renamed from tests/topotests/bgp_bmp/r2vrf/bgpd.conf)8
-rw-r--r--tests/topotests/bgp_bmp/r2vrf/zebra.conf8
-rw-r--r--tests/topotests/bgp_bmp/test_bgp_bmp_1.py11
-rw-r--r--tests/topotests/bgp_bmp/test_bgp_bmp_2.py11
10 files changed, 39 insertions, 46 deletions
diff --git a/tests/topotests/bgp_bmp/r1/bgpd.conf b/tests/topotests/bgp_bmp/r1/frr.conf
index 485c21709..f7cb669b3 100644
--- a/tests/topotests/bgp_bmp/r1/bgpd.conf
+++ b/tests/topotests/bgp_bmp/r1/frr.conf
@@ -1,3 +1,10 @@
+interface r1-eth0
+ ip address 192.0.2.1/24
+!
+interface r1-eth1
+ ip address 192.168.0.1/24
+ ipv6 address 192:168::1/64
+!
router bgp 65501
bgp router-id 192.168.0.1
bgp log-neighbor-changes
@@ -41,7 +48,7 @@ router bgp 65501
exit-address-family
!
router bgp 65501 vrf vrf1
- bgp router_id 192.168.0.1
+ bgp router-id 192.168.0.1
bgp log-neighbor-changes
address-family ipv4 unicast
label vpn export 101
diff --git a/tests/topotests/bgp_bmp/r1/zebra.conf b/tests/topotests/bgp_bmp/r1/zebra.conf
deleted file mode 100644
index 0b523c9e1..000000000
--- a/tests/topotests/bgp_bmp/r1/zebra.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-interface r1-eth0
- ip address 192.0.2.1/24
-!
-interface r1-eth1
- ip address 192.168.0.1/24
- ipv6 address 192:168::1/64
-!
diff --git a/tests/topotests/bgp_bmp/r1vrf/bgpd.conf b/tests/topotests/bgp_bmp/r1vrf/frr.conf
index 961e20498..cb8a7d2b1 100644
--- a/tests/topotests/bgp_bmp/r1vrf/bgpd.conf
+++ b/tests/topotests/bgp_bmp/r1vrf/frr.conf
@@ -1,3 +1,10 @@
+interface r1vrf-eth0
+ ip address 192.0.2.1/24
+!
+interface r1vrf-eth1
+ ip address 192.168.0.1/24
+ ipv6 address 192:168::1/64
+!
router bgp 65501 vrf vrf1
bgp router-id 192.168.0.1
bgp log-neighbor-changes
@@ -15,7 +22,6 @@ router bgp 65501 vrf vrf1
bmp monitor ipv6 unicast loc-rib
exit
!
-
address-family ipv4 unicast
neighbor 192.168.0.2 activate
neighbor 192.168.0.2 soft-reconfiguration inbound
diff --git a/tests/topotests/bgp_bmp/r1vrf/zebra.conf b/tests/topotests/bgp_bmp/r1vrf/zebra.conf
deleted file mode 100644
index a242eadce..000000000
--- a/tests/topotests/bgp_bmp/r1vrf/zebra.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-interface r1vrf-eth0
- ip address 192.0.2.1/24
-!
-interface r1vrf-eth1
- ip address 192.168.0.1/24
- ipv6 address 192:168::1/64
-!
diff --git a/tests/topotests/bgp_bmp/r2/bgpd.conf b/tests/topotests/bgp_bmp/r2/frr.conf
index 40e2cd5bb..250071f48 100644
--- a/tests/topotests/bgp_bmp/r2/bgpd.conf
+++ b/tests/topotests/bgp_bmp/r2/frr.conf
@@ -1,3 +1,11 @@
+interface r2-eth0
+ ip address 192.168.0.2/24
+ ipv6 address 192:168::2/64
+!
+interface r2-eth1
+ ip address 172.31.0.2/24
+ ipv6 address 172:31::2/64
+!
router bgp 65502
bgp router-id 192.168.0.2
bgp log-neighbor-changes
diff --git a/tests/topotests/bgp_bmp/r2/zebra.conf b/tests/topotests/bgp_bmp/r2/zebra.conf
deleted file mode 100644
index 9d82bfe2d..000000000
--- a/tests/topotests/bgp_bmp/r2/zebra.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-interface r2-eth0
- ip address 192.168.0.2/24
- ipv6 address 192:168::2/64
-!
-interface r2-eth1
- ip address 172.31.0.2/24
- ipv6 address 172:31::2/64
-!
diff --git a/tests/topotests/bgp_bmp/r2vrf/bgpd.conf b/tests/topotests/bgp_bmp/r2vrf/frr.conf
index 7c8255a17..5268190de 100644
--- a/tests/topotests/bgp_bmp/r2vrf/bgpd.conf
+++ b/tests/topotests/bgp_bmp/r2vrf/frr.conf
@@ -1,3 +1,11 @@
+interface r2vrf-eth0
+ ip address 192.168.0.2/24
+ ipv6 address 192:168::2/64
+!
+interface r2vrf-eth1
+ ip address 172.31.0.2/24
+ ipv6 address 172:31::2/64
+!
router bgp 65502
bgp router-id 192.168.0.2
bgp log-neighbor-changes
diff --git a/tests/topotests/bgp_bmp/r2vrf/zebra.conf b/tests/topotests/bgp_bmp/r2vrf/zebra.conf
deleted file mode 100644
index 9a8da2d95..000000000
--- a/tests/topotests/bgp_bmp/r2vrf/zebra.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-interface r2vrf-eth0
- ip address 192.168.0.2/24
- ipv6 address 192:168::2/64
-!
-interface r2vrf-eth1
- ip address 172.31.0.2/24
- ipv6 address 172:31::2/64
-!
diff --git a/tests/topotests/bgp_bmp/test_bgp_bmp_1.py b/tests/topotests/bgp_bmp/test_bgp_bmp_1.py
index cc7bc3104..493f357f4 100644
--- a/tests/topotests/bgp_bmp/test_bgp_bmp_1.py
+++ b/tests/topotests/bgp_bmp/test_bgp_bmp_1.py
@@ -79,13 +79,10 @@ def setup_module(mod):
)
for rname, router in tgen.routers().items():
- router.load_config(
- TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
- )
- router.load_config(
- TopoRouter.RD_BGP,
- os.path.join(CWD, "{}/bgpd.conf".format(rname)),
- "-M bmp",
+ logger.info("Loading router %s" % rname)
+ router.load_frr_config(
+ os.path.join(CWD, "{}/frr.conf".format(rname)),
+ [(TopoRouter.RD_ZEBRA, None), (TopoRouter.RD_BGP, "-M bmp")],
)
tgen.start_router()
diff --git a/tests/topotests/bgp_bmp/test_bgp_bmp_2.py b/tests/topotests/bgp_bmp/test_bgp_bmp_2.py
index 97cc98962..82d3824a1 100644
--- a/tests/topotests/bgp_bmp/test_bgp_bmp_2.py
+++ b/tests/topotests/bgp_bmp/test_bgp_bmp_2.py
@@ -91,13 +91,10 @@ ip link set r1vrf-eth1 master vrf1
)
for rname, router in tgen.routers().items():
- router.load_config(
- TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
- )
- router.load_config(
- TopoRouter.RD_BGP,
- os.path.join(CWD, "{}/bgpd.conf".format(rname)),
- "-M bmp",
+ logger.info("Loading router %s" % rname)
+ router.load_frr_config(
+ os.path.join(CWD, "{}/frr.conf".format(rname)),
+ [(TopoRouter.RD_ZEBRA, None), (TopoRouter.RD_BGP, "-M bmp")],
)
tgen.start_router()