]> git.puffer.fish Git - mirror/frr.git/commitdiff
tests: Convert pim_basic to use integrated configuration
authorDonald Sharp <donaldsharp72@gmail.com>
Sun, 13 Apr 2025 17:01:39 +0000 (13:01 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Wed, 23 Apr 2025 17:56:07 +0000 (13:56 -0400)
Since I am in this test, modifying it let's just convert
it to a integrated configuration.

Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
15 files changed:
tests/topotests/pim_basic/r1/bgpd.conf [deleted file]
tests/topotests/pim_basic/r1/frr.conf [new file with mode: 0644]
tests/topotests/pim_basic/r1/pimd.conf [deleted file]
tests/topotests/pim_basic/r1/zebra.conf [deleted file]
tests/topotests/pim_basic/r2/frr.conf [new file with mode: 0644]
tests/topotests/pim_basic/r2/pimd.conf [deleted file]
tests/topotests/pim_basic/r2/zebra.conf [deleted file]
tests/topotests/pim_basic/r3/frr.conf [new file with mode: 0644]
tests/topotests/pim_basic/r3/pimd.conf [deleted file]
tests/topotests/pim_basic/r3/zebra.conf [deleted file]
tests/topotests/pim_basic/rp/bgpd.conf [deleted file]
tests/topotests/pim_basic/rp/frr.conf [new file with mode: 0644]
tests/topotests/pim_basic/rp/pimd.conf [deleted file]
tests/topotests/pim_basic/rp/zebra.conf [deleted file]
tests/topotests/pim_basic/test_pim.py

diff --git a/tests/topotests/pim_basic/r1/bgpd.conf b/tests/topotests/pim_basic/r1/bgpd.conf
deleted file mode 100644 (file)
index 84d9598..0000000
+++ /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 (file)
index 0000000..503e6f1
--- /dev/null
@@ -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 (file)
index 737019f..0000000
+++ /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 (file)
index e430417..0000000
+++ /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 (file)
index 0000000..abcb815
--- /dev/null
@@ -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 (file)
index 932cff6..0000000
+++ /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 (file)
index cb30858..0000000
+++ /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 (file)
index 0000000..2d60a4d
--- /dev/null
@@ -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 (file)
index f94ee99..0000000
+++ /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 (file)
index 8e58e8c..0000000
+++ /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 (file)
index 1bfae60..0000000
+++ /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 (file)
index 0000000..8b40f2f
--- /dev/null
@@ -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 (file)
index fd26bc4..0000000
+++ /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 (file)
index 0a1359e..0000000
+++ /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
-!
index 74d5406970fe7dcadba49ca345260ad6a18fc14d..3ccc4251a50db54a0feabf14218fab73597ffa64 100644 (file)
@@ -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.