From: Donald Sharp Date: Sun, 13 Apr 2025 17:01:39 +0000 (-0400) Subject: tests: Convert pim_basic to use integrated configuration X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=f5de14db8e85a5c01328039ad44f61824234b7c2;p=mirror%2Ffrr.git tests: Convert pim_basic to use integrated configuration Since I am in this test, modifying it let's just convert it to a integrated configuration. Signed-off-by: Donald Sharp --- diff --git a/tests/topotests/pim_basic/r1/bgpd.conf b/tests/topotests/pim_basic/r1/bgpd.conf deleted file mode 100644 index 84d9598bc6..0000000000 --- a/tests/topotests/pim_basic/r1/bgpd.conf +++ /dev/null @@ -1,5 +0,0 @@ -router bgp 65001 - no bgp ebgp-requires-policy - neighbor 10.0.30.3 remote-as external - neighbor 10.0.30.3 timers 3 10 - redistribute connected diff --git a/tests/topotests/pim_basic/r1/frr.conf b/tests/topotests/pim_basic/r1/frr.conf new file mode 100644 index 0000000000..503e6f16e9 --- /dev/null +++ b/tests/topotests/pim_basic/r1/frr.conf @@ -0,0 +1,32 @@ +hostname r1 +! +service integrated-vtysh-config +! +interface r1-eth0 + ip address 10.0.20.1/24 + ip igmp + ip pim +! +interface r1-eth1 + ip address 10.0.30.1/24 + ip pim +! +interface r1-eth2 + ip address 10.0.40.1/24 + ip igmp + ip pim +! +interface lo + ip address 10.254.0.1/32 + ip pim +! +router bgp 65001 + no bgp ebgp-requires-policy + neighbor 10.0.30.3 remote-as external + neighbor 10.0.30.3 timers 3 10 + redistribute connected +! +router pim + rp 10.254.0.3 + join-prune-interval 5 +! diff --git a/tests/topotests/pim_basic/r1/pimd.conf b/tests/topotests/pim_basic/r1/pimd.conf deleted file mode 100644 index 737019fa51..0000000000 --- a/tests/topotests/pim_basic/r1/pimd.conf +++ /dev/null @@ -1,18 +0,0 @@ -hostname r1 -! -interface r1-eth0 - ip igmp - ip pim -! -interface r1-eth1 - ip pim -! -interface r1-eth2 - ip igmp - ip pim -! -interface lo - ip pim -! -ip pim rp 10.254.0.3 -ip pim join-prune-interval 5 diff --git a/tests/topotests/pim_basic/r1/zebra.conf b/tests/topotests/pim_basic/r1/zebra.conf deleted file mode 100644 index e43041758b..0000000000 --- a/tests/topotests/pim_basic/r1/zebra.conf +++ /dev/null @@ -1,14 +0,0 @@ -hostname r1 -! -interface r1-eth0 - ip address 10.0.20.1/24 -! -interface r1-eth1 - ip address 10.0.30.1/24 -! -interface r1-eth2 - ip address 10.0.40.1/24 -! -interface lo - ip address 10.254.0.1/32 -! diff --git a/tests/topotests/pim_basic/r2/frr.conf b/tests/topotests/pim_basic/r2/frr.conf new file mode 100644 index 0000000000..abcb81539c --- /dev/null +++ b/tests/topotests/pim_basic/r2/frr.conf @@ -0,0 +1,15 @@ +hostname r2 +! +frr version 8.4 +frr defaults traditional +! +service integrated-vtysh-config +! +interface r2-eth0 + ip address 10.0.20.2/24 +! +interface lo + ip address 10.254.0.2/32 +! +line vty +! \ No newline at end of file diff --git a/tests/topotests/pim_basic/r2/pimd.conf b/tests/topotests/pim_basic/r2/pimd.conf deleted file mode 100644 index 932cff6f3b..0000000000 --- a/tests/topotests/pim_basic/r2/pimd.conf +++ /dev/null @@ -1 +0,0 @@ -hostname r2 diff --git a/tests/topotests/pim_basic/r2/zebra.conf b/tests/topotests/pim_basic/r2/zebra.conf deleted file mode 100644 index cb30858f58..0000000000 --- a/tests/topotests/pim_basic/r2/zebra.conf +++ /dev/null @@ -1,8 +0,0 @@ -hostname r2 -! -interface r2-eth0 - ip address 10.0.20.2/24 -! -interface lo - ip address 10.254.0.2/32 -! diff --git a/tests/topotests/pim_basic/r3/frr.conf b/tests/topotests/pim_basic/r3/frr.conf new file mode 100644 index 0000000000..2d60a4d685 --- /dev/null +++ b/tests/topotests/pim_basic/r3/frr.conf @@ -0,0 +1,11 @@ +hostname r3 +! +! +service integrated-vtysh-config +! +interface r3-eth0 + ip address 10.0.40.4/24 +! +interface lo + ip address 10.254.0.4/32 +! diff --git a/tests/topotests/pim_basic/r3/pimd.conf b/tests/topotests/pim_basic/r3/pimd.conf deleted file mode 100644 index f94ee99930..0000000000 --- a/tests/topotests/pim_basic/r3/pimd.conf +++ /dev/null @@ -1 +0,0 @@ -hostname r3 diff --git a/tests/topotests/pim_basic/r3/zebra.conf b/tests/topotests/pim_basic/r3/zebra.conf deleted file mode 100644 index 8e58e8c66a..0000000000 --- a/tests/topotests/pim_basic/r3/zebra.conf +++ /dev/null @@ -1,8 +0,0 @@ -hostname r3 -! -interface r3-eth0 - ip address 10.0.40.4/24 -! -interface lo - ip address 10.254.0.4/32 -! diff --git a/tests/topotests/pim_basic/rp/bgpd.conf b/tests/topotests/pim_basic/rp/bgpd.conf deleted file mode 100644 index 1bfae6059b..0000000000 --- a/tests/topotests/pim_basic/rp/bgpd.conf +++ /dev/null @@ -1,5 +0,0 @@ -router bgp 65003 - no bgp ebgp-requires-policy - neighbor 10.0.30.1 remote-as external - neighbor 10.0.30.1 timers 3 10 - redistribute connected diff --git a/tests/topotests/pim_basic/rp/frr.conf b/tests/topotests/pim_basic/rp/frr.conf new file mode 100644 index 0000000000..8b40f2fd1a --- /dev/null +++ b/tests/topotests/pim_basic/rp/frr.conf @@ -0,0 +1,26 @@ +hostname rp +! +! +service integrated-vtysh-config +! +interface rp-eth0 + ip address 10.0.30.3/24 + ip pim +! +interface lo + ip address 10.254.0.3/32 + ip pim +! +router bgp 65003 + no bgp ebgp-requires-policy + neighbor 10.0.30.1 remote-as external + neighbor 10.0.30.1 timers 3 10 + redistribute connected +! +router pim + join-prune-interval 5 + rp 10.254.0.3 + register-accept-list ACCEPT +! +ip prefix-list ACCEPT seq 5 permit 10.0.20.0/24 le 32 +! diff --git a/tests/topotests/pim_basic/rp/pimd.conf b/tests/topotests/pim_basic/rp/pimd.conf deleted file mode 100644 index fd26bc4d71..0000000000 --- a/tests/topotests/pim_basic/rp/pimd.conf +++ /dev/null @@ -1,13 +0,0 @@ -hostname rp -! -interface rp-eth0 - ip pim -! -interface lo - ip pim -! -ip pim join-prune-interval 5 -ip pim rp 10.254.0.3 -ip pim register-accept-list ACCEPT - -ip prefix-list ACCEPT seq 5 permit 10.0.20.0/24 le 32 diff --git a/tests/topotests/pim_basic/rp/zebra.conf b/tests/topotests/pim_basic/rp/zebra.conf deleted file mode 100644 index 0a1359ecd0..0000000000 --- a/tests/topotests/pim_basic/rp/zebra.conf +++ /dev/null @@ -1,8 +0,0 @@ -hostname rp -! -interface rp-eth0 - ip address 10.0.30.3/24 -! -interface lo - ip address 10.254.0.3/32 -! diff --git a/tests/topotests/pim_basic/test_pim.py b/tests/topotests/pim_basic/test_pim.py index 74d5406970..3ccc4251a5 100644 --- a/tests/topotests/pim_basic/test_pim.py +++ b/tests/topotests/pim_basic/test_pim.py @@ -71,16 +71,15 @@ def setup_module(mod): tgen = Topogen(build_topo, mod.__name__) tgen.start_topology() - # For all registered routers, load the zebra configuration file + # For all registered routers, load the integrated configuration file 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_PIM, os.path.join(CWD, "{}/pimd.conf".format(rname)) - ) - router.load_config( - TopoRouter.RD_BGP, os.path.join(CWD, "{}/bgpd.conf".format(rname)) + router.load_frr_config( + os.path.join(CWD, "{}/frr.conf".format(rname)), + [ + (TopoRouter.RD_ZEBRA, None), + (TopoRouter.RD_PIM, None), + (TopoRouter.RD_BGP, None), + ], ) # After loading the configurations, this function loads configured daemons.