]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: Modifying existing topotests to incorporate mgmtd changes. dev/omgmtd
authorYash Ranjan <ranjany@vmware.com>
Thu, 27 Jan 2022 07:18:59 +0000 (23:18 -0800)
committerChristian Hopps <chopps@labn.net>
Wed, 6 Apr 2022 01:41:23 +0000 (21:41 -0400)
Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
93 files changed:
tests/topotests/all_protocol_startup/r1/mgmtd.conf [new file with mode: 0644]
tests/topotests/all_protocol_startup/r1/zebra.conf
tests/topotests/bgp_conditional_advertisement/r1/mgmtd.conf [new file with mode: 0644]
tests/topotests/bgp_conditional_advertisement/r1/zebra.conf
tests/topotests/bgp_conditional_advertisement/test_bgp_conditional_advertisement.py
tests/topotests/bgp_default_route_route_map_match/r1/mgmtd.conf [new file with mode: 0644]
tests/topotests/bgp_default_route_route_map_match/r1/zebra.conf
tests/topotests/bgp_default_route_route_map_match_set/r1/mgmtd.conf [new file with mode: 0644]
tests/topotests/bgp_default_route_route_map_match_set/r1/zebra.conf
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/mgmtd.conf [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra.conf
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/mgmtd.conf [new file with mode: 0644]
tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra.conf
tests/topotests/bgp_l3vpn_to_bgp_direct/r1/mgmtd.conf [new file with mode: 0644]
tests/topotests/bgp_l3vpn_to_bgp_direct/r1/zebra.conf
tests/topotests/bgp_l3vpn_to_bgp_direct/r3/mgmtd.conf [new file with mode: 0644]
tests/topotests/bgp_l3vpn_to_bgp_direct/r3/zebra.conf
tests/topotests/bgp_l3vpn_to_bgp_direct/r4/mgmtd.conf [new file with mode: 0644]
tests/topotests/bgp_l3vpn_to_bgp_direct/r4/zebra.conf
tests/topotests/bgp_lu_topo2/R3/mgmtd.conf [new file with mode: 0644]
tests/topotests/bgp_lu_topo2/test_bgp_lu2.py
tests/topotests/bgp_peer_type_multipath_relax/r2/mgmtd.conf [new file with mode: 0644]
tests/topotests/bgp_peer_type_multipath_relax/test_bgp_peer-type_multipath-relax.py
tests/topotests/bgp_rfapi_basic_sanity/r1/mgmtd.conf [new file with mode: 0644]
tests/topotests/bgp_rfapi_basic_sanity/r1/zebra.conf
tests/topotests/bgp_rfapi_basic_sanity/r3/mgmtd.conf [new file with mode: 0644]
tests/topotests/bgp_rfapi_basic_sanity/r3/zebra.conf
tests/topotests/bgp_rfapi_basic_sanity/r4/mgmtd.conf [new file with mode: 0644]
tests/topotests/bgp_rfapi_basic_sanity/r4/zebra.conf
tests/topotests/bgp_suppress_fib/r1/mgmtd.conf [new file with mode: 0644]
tests/topotests/bgp_suppress_fib/r1/zebra.conf
tests/topotests/config_timing/r1/mgmtd.conf [new file with mode: 0644]
tests/topotests/config_timing/test_config_timing.py
tests/topotests/eigrp_topo1/r3/mgmtd.conf [new file with mode: 0644]
tests/topotests/eigrp_topo1/r3/zebra.conf
tests/topotests/eigrp_topo1/test_eigrp_topo1.py
tests/topotests/isis_sr_te_topo1/dst/mgmtd.conf [new file with mode: 0644]
tests/topotests/isis_sr_te_topo1/rt1/mgmtd.conf [new file with mode: 0644]
tests/topotests/isis_sr_te_topo1/rt2/mgmtd.conf [new file with mode: 0644]
tests/topotests/isis_sr_te_topo1/rt3/mgmtd.conf [new file with mode: 0644]
tests/topotests/isis_sr_te_topo1/rt4/mgmtd.conf [new file with mode: 0644]
tests/topotests/isis_sr_te_topo1/rt5/mgmtd.conf [new file with mode: 0644]
tests/topotests/isis_sr_te_topo1/rt6/mgmtd.conf [new file with mode: 0644]
tests/topotests/isis_sr_te_topo1/rt6/zebra.conf
tests/topotests/isis_sr_te_topo1/test_isis_sr_te_topo1.py
tests/topotests/lib/topogen.py
tests/topotests/lib/topotest.py
tests/topotests/nhrp_topo/r1/mgmtd.conf [new file with mode: 0644]
tests/topotests/nhrp_topo/r1/zebra.conf
tests/topotests/nhrp_topo/r2/mgmtd.conf [new file with mode: 0644]
tests/topotests/nhrp_topo/r2/zebra.conf
tests/topotests/nhrp_topo/test_nhrp_topo.py
tests/topotests/ospf6_topo2/r1/mgmtd.conf [new file with mode: 0644]
tests/topotests/ospf6_topo2/r2/mgmtd.conf [new file with mode: 0644]
tests/topotests/ospf6_topo2/r3/mgmtd.conf [new file with mode: 0644]
tests/topotests/ospf6_topo2/r3/zebra.conf
tests/topotests/ospf6_topo2/r4/mgmtd.conf [new file with mode: 0644]
tests/topotests/ospf_instance_redistribute/test_ospf_instance_redistribute.py
tests/topotests/ospf_sr_te_topo1/rt6/mgmtd.conf [new file with mode: 0644]
tests/topotests/ospf_sr_te_topo1/rt6/zebra.conf
tests/topotests/ospf_sr_te_topo1/test_ospf_sr_te_topo1.py
tests/topotests/ospf_suppress_fa/r3/mgmtd.conf [new file with mode: 0644]
tests/topotests/ospf_suppress_fa/r3/zebra.conf
tests/topotests/pim_acl/h1/mgmtd.conf [new file with mode: 0644]
tests/topotests/pim_acl/h1/zebra.conf
tests/topotests/pim_acl/h2/mgmtd.conf [new file with mode: 0644]
tests/topotests/pim_acl/h2/zebra.conf
tests/topotests/pim_acl/r11/mgmtd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r11/zebra.conf
tests/topotests/pim_acl/r12/mgmtd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r12/zebra.conf
tests/topotests/pim_acl/r13/mgmtd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r13/zebra.conf
tests/topotests/pim_acl/r14/mgmtd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r14/zebra.conf
tests/topotests/pim_acl/r15/mgmtd.conf [new file with mode: 0644]
tests/topotests/pim_acl/r15/zebra.conf
tests/topotests/pim_igmp_vrf/h1/mgmtd.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/h1/zebra.conf
tests/topotests/pim_igmp_vrf/h2/mgmtd.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/h2/zebra.conf
tests/topotests/pim_igmp_vrf/h3/mgmtd.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/h3/zebra.conf
tests/topotests/pim_igmp_vrf/h4/mgmtd.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/h4/zebra.conf
tests/topotests/pim_igmp_vrf/r11/mgmtd.conf [new file with mode: 0644]
tests/topotests/pim_igmp_vrf/r11/zebra.conf
tests/topotests/pim_igmp_vrf/r12/mgmtd.conf [new file with mode: 0644]
tests/topotests/rip_topo1/r3/mgmtd.conf [new file with mode: 0644]
tests/topotests/rip_topo1/r3/zebra.conf
tests/topotests/rip_topo1/test_rip_topo1.py
tests/topotests/zebra_nht_resolution/test_verify_nh_resolution.py
tests/topotests/zebra_rib/r1/mgmtd.conf [new file with mode: 0644]

diff --git a/tests/topotests/all_protocol_startup/r1/mgmtd.conf b/tests/topotests/all_protocol_startup/r1/mgmtd.conf
new file mode 100644 (file)
index 0000000..41fc61c
--- /dev/null
@@ -0,0 +1,45 @@
+!
+# Create the various blackhole route types
+ip route 4.5.6.7/32 blackhole
+ipv6 route 4:5::6:7/128 blackhole
+ip route 4.5.6.8/32 Null0
+ipv6 route 4:5::6:8/128 Null0
+ip route 4.5.6.9/32 reject
+ipv6 route 4:5::6:9/128 reject
+# Test various spellings of NULL0 to make sure we accept them
+ip route 4.5.6.13/32 null0
+ip route 4.5.6.14/32 NULL0
+# Create normal gateway routes
+ip route 4.5.6.10/32 192.168.0.2
+ipv6 route 4:5::6:10/128 fc00:0:0:0::2
+# Create normal gateway + interface routes
+ip route 4.5.6.11/32 192.168.0.2 r1-eth0
+ipv6 route 4:5::6:11/128 fc00:0:0:0::2 r1-eth0
+# Create ifname routes
+ip route 4.5.6.12/32 r1-eth0
+ipv6 route 4:5::6:12/128 r1-eth0
+# Create a route that has a large admin distance
+# an admin distance of 255 should be accepted
+# by zebra but not installed.
+ip route 4.5.6.15/32 192.168.0.2 255
+ipv6 route 4:5::6:15/128 fc00:0:0:0::2 255
+# Routes to put into a nexthop-group
+ip route 1.1.1.1/32 r1-eth1
+ip route 1.1.1.2/32 r1-eth2
+ip route 1.1.1.3/32 r1-eth3
+ip route 1.1.1.4/32 r1-eth4
+ip route 1.1.1.5/32 r1-eth5
+ip route 1.1.1.6/32 r1-eth6
+ip route 1.1.1.7/32 r1-eth7
+ip route 1.1.1.8/32 r1-eth8
+
+# Create a route that has overlapping distance
+# so we have backups
+ip route 4.5.6.16/32 192.168.0.2 5
+ip route 4.5.6.16/32 192.168.0.4 10
+
+# Create routes that have different tags
+# and how we handle it
+ip route 4.5.6.17/32 192.168.0.2 tag 9000
+ip route 4.5.6.17/32 192.168.0.2 tag 10000
+!
index c5ef79630e21fa179e858ab410cce0d2bab648a7..6d1e9e467610c5f46bc0816d87c15db4e1336f21 100644 (file)
@@ -1,51 +1,6 @@
 log file zebra.log
 !
 hostname r1
-!
-# Create the various blackhole route types
-ip route 4.5.6.7/32 blackhole
-ipv6 route 4:5::6:7/128 blackhole
-ip route 4.5.6.8/32 Null0
-ipv6 route 4:5::6:8/128 Null0
-ip route 4.5.6.9/32 reject
-ipv6 route 4:5::6:9/128 reject
-# Test various spellings of NULL0 to make sure we accept them
-ip route 4.5.6.13/32 null0
-ip route 4.5.6.14/32 NULL0
-# Create normal gateway routes
-ip route 4.5.6.10/32 192.168.0.2
-ipv6 route 4:5::6:10/128 fc00:0:0:0::2
-# Create normal gateway + interface routes
-ip route 4.5.6.11/32 192.168.0.2 r1-eth0
-ipv6 route 4:5::6:11/128 fc00:0:0:0::2 r1-eth0
-# Create ifname routes
-ip route 4.5.6.12/32 r1-eth0
-ipv6 route 4:5::6:12/128 r1-eth0
-# Create a route that has a large admin distance
-# an admin distance of 255 should be accepted
-# by zebra but not installed.
-ip route 4.5.6.15/32 192.168.0.2 255
-ipv6 route 4:5::6:15/128 fc00:0:0:0::2 255
-# Routes to put into a nexthop-group
-ip route 1.1.1.1/32 r1-eth1
-ip route 1.1.1.2/32 r1-eth2
-ip route 1.1.1.3/32 r1-eth3
-ip route 1.1.1.4/32 r1-eth4
-ip route 1.1.1.5/32 r1-eth5
-ip route 1.1.1.6/32 r1-eth6
-ip route 1.1.1.7/32 r1-eth7
-ip route 1.1.1.8/32 r1-eth8
-
-# Create a route that has overlapping distance
-# so we have backups
-ip route 4.5.6.16/32 192.168.0.2 5
-ip route 4.5.6.16/32 192.168.0.4 10
-
-# Create routes that have different tags
-# and how we handle it
-ip route 4.5.6.17/32 192.168.0.2 tag 9000
-ip route 4.5.6.17/32 192.168.0.2 tag 10000
-
 !
 interface r1-eth0
  description to sw0 - no routing protocol
diff --git a/tests/topotests/bgp_conditional_advertisement/r1/mgmtd.conf b/tests/topotests/bgp_conditional_advertisement/r1/mgmtd.conf
new file mode 100644 (file)
index 0000000..c5b6ccb
--- /dev/null
@@ -0,0 +1,8 @@
+!
+ip route 0.0.0.0/0 blackhole
+ip route 192.0.2.1/32 blackhole
+ip route 192.0.2.2/32 blackhole
+ip route 192.0.2.3/32 blackhole
+ip route 192.0.2.4/32 blackhole
+ip route 192.0.2.5/32 blackhole
+!
index bb887e41ade4cce744348852d9c7b06b68af1891..e289257cce7e4a7b8d87f4935c058db60b65d3ff 100644 (file)
@@ -1,13 +1,6 @@
 !
 hostname Router1
 !
-ip route 0.0.0.0/0 blackhole
-ip route 192.0.2.1/32 blackhole
-ip route 192.0.2.2/32 blackhole
-ip route 192.0.2.3/32 blackhole
-ip route 192.0.2.4/32 blackhole
-ip route 192.0.2.5/32 blackhole
-!
 interface r1-eth0
  ip address 10.10.10.1/24
 !
index 6153aee4181874e14199791a83f5cfa5d0925fc0..526a9d210de03f3bbdbf6fd5173ae79705a30105 100644 (file)
@@ -168,6 +168,9 @@ def setup_module(mod):
     router_list = tgen.routers()
 
     for i, (rname, router) in enumerate(router_list.items(), 1):
+        router.load_config(
+            TopoRouter.RD_MGMTD, os.path.join(CWD, "{}/mgmtd.conf".format(rname))
+        )
         router.load_config(
             TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
         )
diff --git a/tests/topotests/bgp_default_route_route_map_match/r1/mgmtd.conf b/tests/topotests/bgp_default_route_route_map_match/r1/mgmtd.conf
new file mode 100644 (file)
index 0000000..0f2eb6a
--- /dev/null
@@ -0,0 +1 @@
+ip route 192.168.13.0./24 Null0
index 9e581a7be7ec0f8dbfc6d8f5da9ce6d919f3ac98..0a283c06d57c15d87fe3c0a2807105fbe1f4a21b 100644 (file)
@@ -5,7 +5,5 @@ interface lo
 interface r1-eth0
  ip address 192.168.255.1/24
 !
-ip route 192.168.13.0./24 Null0
-!
 ip forwarding
 !
diff --git a/tests/topotests/bgp_default_route_route_map_match_set/r1/mgmtd.conf b/tests/topotests/bgp_default_route_route_map_match_set/r1/mgmtd.conf
new file mode 100644 (file)
index 0000000..6105f1d
--- /dev/null
@@ -0,0 +1,3 @@
+!
+ip route 192.168.13.0./24 Null0
+!
index 9e581a7be7ec0f8dbfc6d8f5da9ce6d919f3ac98..0a283c06d57c15d87fe3c0a2807105fbe1f4a21b 100644 (file)
@@ -5,7 +5,5 @@ interface lo
 interface r1-eth0
  ip address 192.168.255.1/24
 !
-ip route 192.168.13.0./24 Null0
-!
 ip forwarding
 !
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/mgmtd.conf b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/mgmtd.conf
new file mode 100644 (file)
index 0000000..fffd0b0
--- /dev/null
@@ -0,0 +1 @@
+ip route 10.100.0.2/32 10.0.1.2
index 99a2e89ef34e686e64a12aed6627fd2329535b91..8278334addabdbef3105ec592499f394ece9f933 100644 (file)
@@ -1,8 +1,6 @@
 !
 log file zebra.log
 !
-ip route 10.100.0.2/32 10.0.1.2
-!
 vrf vrf-blue
  vni 1000 prefix-routes-only
  exit-vrf
diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/mgmtd.conf b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/mgmtd.conf
new file mode 100644 (file)
index 0000000..b78fa60
--- /dev/null
@@ -0,0 +1 @@
+ip route 10.100.0.1/32 10.0.1.1
index b78cdcc5127700ec713b3fb8465048ac33872aec..0993727586af741f31b642ad2b119a79df668b88 100644 (file)
@@ -1,8 +1,6 @@
 !
 log file zebra.log
 !
-ip route 10.100.0.1/32 10.0.1.1
-!
 vrf vrf-blue
  vni 1000 prefix-routes-only
  exit-vrf
diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/r1/mgmtd.conf b/tests/topotests/bgp_l3vpn_to_bgp_direct/r1/mgmtd.conf
new file mode 100644 (file)
index 0000000..b3f7447
--- /dev/null
@@ -0,0 +1,3 @@
+!
+ip route 99.0.0.1/32 192.168.1.2
+!
index 18f61e0c54c51e5d8db1bc77e5c5424475a1eec8..188f14f7dd4f5b35d5f8e57724d7bfb78e07d9bc 100644 (file)
@@ -15,8 +15,6 @@ interface r1-eth4
  ip address 192.168.1.1/24
  no link-detect
 !
-ip route 99.0.0.1/32 192.168.1.2
-!
 ip forwarding
 !
 !
diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/r3/mgmtd.conf b/tests/topotests/bgp_l3vpn_to_bgp_direct/r3/mgmtd.conf
new file mode 100644 (file)
index 0000000..07c127c
--- /dev/null
@@ -0,0 +1 @@
+ip route 99.0.0.2/32 192.168.1.2
index 9dbc29024378a212d8570839e26fb0b61643e4f8..7564aed8920d37b79cafbb96c2c39c0a4f10975c 100644 (file)
@@ -20,8 +20,6 @@ interface r3-eth4
  ip address 192.168.1.1/24
  no link-detect
 !
-ip route 99.0.0.2/32 192.168.1.2
-!
 ip forwarding
 !
 !
diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/r4/mgmtd.conf b/tests/topotests/bgp_l3vpn_to_bgp_direct/r4/mgmtd.conf
new file mode 100644 (file)
index 0000000..358ec75
--- /dev/null
@@ -0,0 +1 @@
+ip route 99.0.0.3/32 192.168.1.2
index 415f03df51250e02db08e3d4cd870b0f32298d6e..c79e34913048926d991758c36214d16631fd1882 100644 (file)
@@ -15,8 +15,6 @@ interface r4-eth4
  ip address 192.168.1.1/24
  no link-detect
 !
-ip route 99.0.0.3/32 192.168.1.2
-!
 ip forwarding
 !
 line vty
diff --git a/tests/topotests/bgp_lu_topo2/R3/mgmtd.conf b/tests/topotests/bgp_lu_topo2/R3/mgmtd.conf
new file mode 100644 (file)
index 0000000..bcc4036
--- /dev/null
@@ -0,0 +1 @@
+ip route 10.0.4.0/24 10.0.1.2
index fc9d2c433a1a0f00c3795f63600f6a5151fd16fa..23b184ccbb7038b111daceb8e519bcae30b47e6b 100644 (file)
@@ -121,6 +121,9 @@ def setup_module(mod):
 
     # For all registered routers, load the zebra configuration file
     for rname, router in router_list.items():
+        router.load_config(
+            TopoRouter.RD_MGMTD, os.path.join(CWD, "{}/mgmtd.conf".format(rname))
+        )
         router.load_config(
             TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
         )
diff --git a/tests/topotests/bgp_peer_type_multipath_relax/r2/mgmtd.conf b/tests/topotests/bgp_peer_type_multipath_relax/r2/mgmtd.conf
new file mode 100644 (file)
index 0000000..86110c2
--- /dev/null
@@ -0,0 +1,3 @@
+!
+ip route 198.51.100.0/24 10.0.2.2
+!
index 8321a57552430f4880ec4bf7012ddbd5c809e3da..80aecfb4324a5feefda997cba40910f36661a813 100755 (executable)
@@ -104,6 +104,9 @@ def setup_module(mod):
     # For all registered routers, load the zebra configuration file
     for rname, router in tgen.routers().items():
         router.run("/bin/bash {}/setup_vrfs".format(CWD))
+        router.load_config(
+            TopoRouter.RD_MGMTD, os.path.join(CWD, "{}/mgmtd.conf".format(rname))
+        )
         router.load_config(
             TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
         )
diff --git a/tests/topotests/bgp_rfapi_basic_sanity/r1/mgmtd.conf b/tests/topotests/bgp_rfapi_basic_sanity/r1/mgmtd.conf
new file mode 100644 (file)
index 0000000..b3f7447
--- /dev/null
@@ -0,0 +1,3 @@
+!
+ip route 99.0.0.1/32 192.168.1.2
+!
index 18f61e0c54c51e5d8db1bc77e5c5424475a1eec8..188f14f7dd4f5b35d5f8e57724d7bfb78e07d9bc 100644 (file)
@@ -15,8 +15,6 @@ interface r1-eth4
  ip address 192.168.1.1/24
  no link-detect
 !
-ip route 99.0.0.1/32 192.168.1.2
-!
 ip forwarding
 !
 !
diff --git a/tests/topotests/bgp_rfapi_basic_sanity/r3/mgmtd.conf b/tests/topotests/bgp_rfapi_basic_sanity/r3/mgmtd.conf
new file mode 100644 (file)
index 0000000..b2e2aa7
--- /dev/null
@@ -0,0 +1,3 @@
+!
+ip route 99.0.0.2/32 192.168.1.2
+!
index 9dbc29024378a212d8570839e26fb0b61643e4f8..7564aed8920d37b79cafbb96c2c39c0a4f10975c 100644 (file)
@@ -20,8 +20,6 @@ interface r3-eth4
  ip address 192.168.1.1/24
  no link-detect
 !
-ip route 99.0.0.2/32 192.168.1.2
-!
 ip forwarding
 !
 !
diff --git a/tests/topotests/bgp_rfapi_basic_sanity/r4/mgmtd.conf b/tests/topotests/bgp_rfapi_basic_sanity/r4/mgmtd.conf
new file mode 100644 (file)
index 0000000..96001e6
--- /dev/null
@@ -0,0 +1,3 @@
+!
+ip route 99.0.0.3/32 192.168.1.2
+!
index 415f03df51250e02db08e3d4cd870b0f32298d6e..c79e34913048926d991758c36214d16631fd1882 100644 (file)
@@ -15,8 +15,6 @@ interface r4-eth4
  ip address 192.168.1.1/24
  no link-detect
 !
-ip route 99.0.0.3/32 192.168.1.2
-!
 ip forwarding
 !
 line vty
diff --git a/tests/topotests/bgp_suppress_fib/r1/mgmtd.conf b/tests/topotests/bgp_suppress_fib/r1/mgmtd.conf
new file mode 100644 (file)
index 0000000..5627875
--- /dev/null
@@ -0,0 +1,4 @@
+!
+ip route 40.0.0.0/8 blackhole
+ip route 50.0.0.0/8 blackhole
+!
index 7b442164ff99b57815dcdb2642fb587061904221..3b8e6ffdc7d6e88b77e79c91b1ed85ff5ee7d8c9 100644 (file)
@@ -3,7 +3,4 @@ interface r1-eth0
  ip address 10.0.0.1/30
 !
 ip forwarding
-!
-ip route 40.0.0.0/8 blackhole
-ip route 50.0.0.0/8 blackhole
-!
+
diff --git a/tests/topotests/config_timing/r1/mgmtd.conf b/tests/topotests/config_timing/r1/mgmtd.conf
new file mode 100644 (file)
index 0000000..e69de29
index 7ab8619b01c1337a6d5a9e7cbd7e5fb46399ded5..d86d05b89ecd8b87b58e43ecadee0c84de31de22 100644 (file)
@@ -45,7 +45,7 @@ sys.path.append(os.path.join(CWD, "../"))
 # pylint: disable=C0413
 from lib.topogen import Topogen, TopoRouter, get_topogen
 from lib.topolog import logger
-
+from lib import topotest
 pytestmark = [pytest.mark.staticd]
 
 
@@ -61,6 +61,10 @@ def setup_module(mod):
 
     router_list = tgen.routers()
     for rname, router in router_list.items():
+        router.load_config(
+            TopoRouter.RD_MGMTD,
+            os.path.join(CWD, "{}/mgmtd.conf".format(rname)),
+        )
         router.load_config(
             TopoRouter.RD_ZEBRA,
             os.path.join(CWD, "{}/zebra.conf".format(rname)),
@@ -167,7 +171,7 @@ def test_static_timing():
         [u"10.0.0.0/8", u"11.0.0.0/8"],
         [u"2100:1111:2220::/44", u"2100:3333:4440::/44"],
     ]
-
+    topotest.sleep(5)
     bad_indices = []
     for ipv6 in [False, True]:
         base_delta = do_config(
diff --git a/tests/topotests/eigrp_topo1/r3/mgmtd.conf b/tests/topotests/eigrp_topo1/r3/mgmtd.conf
new file mode 100644 (file)
index 0000000..3216fd2
--- /dev/null
@@ -0,0 +1 @@
+ip route 192.168.2.0/24 192.168.3.10
index 7f145b458313e82b4cb20e8da7d7d543a31f4b8b..15b454f7f500222363fbca914035c824158cd022 100644 (file)
@@ -12,8 +12,6 @@ interface r3-eth1
  ip address 193.1.2.2/24
  no link-detect
 !
-ip route 192.168.2.0/24 192.168.3.10
-!
 ip forwarding
 ipv6 forwarding
 !
index 8b7c9fc6d79875be2502506acf9a32397e59174a..59a2a2a28e0ad8e44aeca545cf9f1961e6a18c4a 100644 (file)
@@ -94,6 +94,9 @@ def setup_module(module):
     # This is a sample of configuration loading.
     router_list = tgen.routers()
     for rname, router in router_list.items():
+        router.load_config(
+            TopoRouter.RD_MGMTD, os.path.join(CWD, "{}/mgmtd.conf".format(rname))
+        )
         router.load_config(
             TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
         )
diff --git a/tests/topotests/isis_sr_te_topo1/dst/mgmtd.conf b/tests/topotests/isis_sr_te_topo1/dst/mgmtd.conf
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/topotests/isis_sr_te_topo1/rt1/mgmtd.conf b/tests/topotests/isis_sr_te_topo1/rt1/mgmtd.conf
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/topotests/isis_sr_te_topo1/rt2/mgmtd.conf b/tests/topotests/isis_sr_te_topo1/rt2/mgmtd.conf
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/topotests/isis_sr_te_topo1/rt3/mgmtd.conf b/tests/topotests/isis_sr_te_topo1/rt3/mgmtd.conf
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/topotests/isis_sr_te_topo1/rt4/mgmtd.conf b/tests/topotests/isis_sr_te_topo1/rt4/mgmtd.conf
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/topotests/isis_sr_te_topo1/rt5/mgmtd.conf b/tests/topotests/isis_sr_te_topo1/rt5/mgmtd.conf
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/topotests/isis_sr_te_topo1/rt6/mgmtd.conf b/tests/topotests/isis_sr_te_topo1/rt6/mgmtd.conf
new file mode 100644 (file)
index 0000000..13ea93c
--- /dev/null
@@ -0,0 +1 @@
+ip route 9.9.9.2/32 10.0.11.2
index f2f1a3eefee55143d7ed2d38e784d36e8bab3dec..8445d56eb829ffc2f6d809cd15a0d35933bebcb5 100644 (file)
@@ -21,7 +21,5 @@ interface eth-dst
 !
 ip forwarding
 !
-ip route 9.9.9.2/32 10.0.11.2
-!
 line vty
 !
index fb987ba4892f63721068b49382460d4b23bbb9b4..47b257bbb32a3fcfba2059a45e2c412f5bae82b6 100755 (executable)
@@ -161,6 +161,9 @@ def setup_module(mod):
 
     # For all registered routers, load the zebra configuration file
     for rname, router in router_list.items():
+        router.load_config(
+            TopoRouter.RD_MGMTD, os.path.join(CWD, "{}/mgmtd.conf".format(rname))
+        )
         router.load_config(
             TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
         )
index 3bb63a017bc8432518439795c7a6b93eee61ff0f..9c72adc74442b37c074fcbbd2cf9aa374000196c 100644 (file)
@@ -801,7 +801,8 @@ class TopoRouter(TopoGear):
         """
         self.load_config(self.RD_FRR, source)
         if not daemons:
-            # Always add zebra
+            # Always add zebra and mgmtd
+            self.load_config(self.RD_MGMTD)
             self.load_config(self.RD_ZEBRA)
             for daemon in self.RD:
                 # This will not work for all daemons
index dc50d6b0c5a12131d1daa1f2f416fa9ec87f1831..7c01728c80be90c0a6843a72f7351dae1b95d39f 100644 (file)
@@ -1322,6 +1322,7 @@ class Router(Node):
         self.routertype = "frr"
         self.unified_config = None
         self.daemons = {
+            "mgmtd": 0,
             "zebra": 0,
             "ripd": 0,
             "ripngd": 0,
@@ -1339,10 +1340,9 @@ class Router(Node):
             "babeld": 0,
             "pbrd": 0,
             "pathd": 0,
-            "snmpd": 0,
-            "mgmtd": 0,
+            "snmpd": 0
         }
-        self.daemons_options = {"zebra": "", "mgmtd": ""}
+        self.daemons_options = {"mgmtd": "", "zebra": ""}
         self.reportCores = True
         self.version = None
 
@@ -1386,13 +1386,14 @@ class Router(Node):
             self._config_frr(**params)
         else:
             # Test the provided path
+            cpath = os.path.join(self.daemondir, "mgmtd")
+            if not os.path.isfile(zpath):
+                raise Exception("No MGMTD binary found in {}".format(cpath))
+
             zpath = os.path.join(self.daemondir, "zebra")
             if not os.path.isfile(zpath):
                 raise Exception("No zebra binary found in {}".format(zpath))
 
-            cpath = os.path.join(self.daemondir, "mgmtd")
-            if not os.path.isfile(zpath):
-                raise Exception("No MGMTD binary found in {}".format(cpath))
             # Allow user to specify routertype when the path was specified.
             if params.get("routertype") is not None:
                 self.routertype = params.get("routertype")
diff --git a/tests/topotests/nhrp_topo/r1/mgmtd.conf b/tests/topotests/nhrp_topo/r1/mgmtd.conf
new file mode 100644 (file)
index 0000000..6b98c8b
--- /dev/null
@@ -0,0 +1 @@
+ip route 10.2.1.0/24 10.1.1.3
index b45670fcb25f60aa22656423e5d633a81ad2e0e5..8606335c0ca4fc2930e965e0caefc3c2787ec44f 100644 (file)
@@ -1,7 +1,6 @@
 interface r1-eth0
  ip address 10.1.1.1/24
 !
-ip route 10.2.1.0/24 10.1.1.3
 interface r1-gre0
  ip address 10.255.255.1/32
  no link-detect
diff --git a/tests/topotests/nhrp_topo/r2/mgmtd.conf b/tests/topotests/nhrp_topo/r2/mgmtd.conf
new file mode 100644 (file)
index 0000000..6ac63e6
--- /dev/null
@@ -0,0 +1 @@
+ip route 10.1.1.0/24 10.2.1.3
index 9f40d4d72e431b2c45dc3de191ae407b6eefa239..5b7e1362849d50b95eff69f1bd72fb95fe833a2d 100644 (file)
@@ -1,7 +1,6 @@
 interface r2-eth0
  ip address 10.2.1.2/24
 !
-ip route 10.1.1.0/24 10.2.1.3
 interface r2-gre0
  ip address 10.255.255.2/32
  no link-detect
index e6e551906a981f6acb17fa0d4509c5c12e82baa6..d1ba5a0ec23e1f884cda449369f210e4ebbb208c 100644 (file)
@@ -112,6 +112,10 @@ def setup_module(mod):
     _populate_iface()
 
     for rname, router in router_list.items():
+        router.load_config(
+            TopoRouter.RD_MGMTD,
+            os.path.join(CWD, "{}/mgmtd.conf".format(rname)),
+        )
         router.load_config(
             TopoRouter.RD_ZEBRA,
             os.path.join(CWD, "{}/zebra.conf".format(rname)),
diff --git a/tests/topotests/ospf6_topo2/r1/mgmtd.conf b/tests/topotests/ospf6_topo2/r1/mgmtd.conf
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/topotests/ospf6_topo2/r2/mgmtd.conf b/tests/topotests/ospf6_topo2/r2/mgmtd.conf
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/topotests/ospf6_topo2/r3/mgmtd.conf b/tests/topotests/ospf6_topo2/r3/mgmtd.conf
new file mode 100644 (file)
index 0000000..a917bdf
--- /dev/null
@@ -0,0 +1,3 @@
+ipv6 route fc00:1::/64 fc00:100::1234
+ipv6 route fc00:2::/64 fc00:100::1234
+ipv6 route fc00:3::/64 fc00:100::1234
index dea2fe4778fbbc88b66e9912bf992b3be7e907b3..d54130742ad4363a37032385f3c4551e42860d36 100644 (file)
@@ -3,6 +3,3 @@ ipv6 forwarding
 interface r3-eth0
  ipv6 address 2001:db8:2::1/64
 !
-ipv6 route fc00:1::/64 fc00:100::1234
-ipv6 route fc00:2::/64 fc00:100::1234
-ipv6 route fc00:3::/64 fc00:100::1234
diff --git a/tests/topotests/ospf6_topo2/r4/mgmtd.conf b/tests/topotests/ospf6_topo2/r4/mgmtd.conf
new file mode 100644 (file)
index 0000000..e69de29
index 88c236d7a004e156432a679f0ecd023014ef0075..24223c9e1ea4574f78b2c5bed6ce7ce50a32f7b0 100644 (file)
@@ -77,6 +77,9 @@ def setup_module(module):
 
     # This is a sample of configuration loading.
     r1 = tgen.gears["r1"]
+    r1.load_config(
+        TopoRouter.RD_MGMTD, os.path.join(CWD, "r1/mgmtd.conf")
+    )
     r1.load_config(
         TopoRouter.RD_ZEBRA, os.path.join(CWD, "r1/zebra.conf")
     )
diff --git a/tests/topotests/ospf_sr_te_topo1/rt6/mgmtd.conf b/tests/topotests/ospf_sr_te_topo1/rt6/mgmtd.conf
new file mode 100644 (file)
index 0000000..13ea93c
--- /dev/null
@@ -0,0 +1 @@
+ip route 9.9.9.2/32 10.0.11.2
index c556aa3681d3af0b5a9816daae70151844f37692..565eb98a58f038ba99e283b6dcd289b1e5fc91a1 100644 (file)
@@ -32,7 +32,5 @@ interface eth-dst
 !
 ip forwarding
 !
-ip route 9.9.9.2/32 10.0.11.2
-!
 line vty
 !
index 6e992674ac017031bbfa7ceca14564945dcbb87c..2e329c8ed3ce24d465a30a06b2d08b018793296f 100755 (executable)
@@ -161,6 +161,9 @@ def setup_module(mod):
 
     # For all registered routers, load the zebra configuration file
     for rname, router in router_list.items():
+        router.load_config(
+            TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/mgmtd.conf".format(rname))
+        )
         router.load_config(
             TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname))
         )
diff --git a/tests/topotests/ospf_suppress_fa/r3/mgmtd.conf b/tests/topotests/ospf_suppress_fa/r3/mgmtd.conf
new file mode 100644 (file)
index 0000000..83ffc93
--- /dev/null
@@ -0,0 +1,5 @@
+!
+ip route 3.3.1.1/32 Null0
+ip route 3.3.2.2/32 Null0
+ip route 3.3.3.3/32 Null0
+!
index f76cbf74d22771b61f9011c852df78c147114b1d..1e38a59fd0d3d60fd6ddd5a2bde26f07acd93ad4 100644 (file)
@@ -1,8 +1,3 @@
-!
-ip route 3.3.1.1/32 Null0
-ip route 3.3.2.2/32 Null0
-ip route 3.3.3.3/32 Null0
-!
 interface r3-eth0
  ip address 10.0.23.3/24
 !
diff --git a/tests/topotests/pim_acl/h1/mgmtd.conf b/tests/topotests/pim_acl/h1/mgmtd.conf
new file mode 100644 (file)
index 0000000..4d78980
--- /dev/null
@@ -0,0 +1 @@
+ip route 0.0.0.0/0 192.168.100.1
index 3d6540d40c64bda8e70016f849751e169471bae0..08e3980ff4ffd6eb9b0aff75e6a2b2172e0ee124 100644 (file)
@@ -6,5 +6,3 @@ interface h1-eth0
  description connection to r1 via sw1
  ip address 192.168.100.10/24
 !
-ip route 0.0.0.0/0 192.168.100.1
-!
diff --git a/tests/topotests/pim_acl/h2/mgmtd.conf b/tests/topotests/pim_acl/h2/mgmtd.conf
new file mode 100644 (file)
index 0000000..97bc66b
--- /dev/null
@@ -0,0 +1 @@
+ip route 0.0.0.0/0 192.168.101.1
index 95342f9e8ae39905df7a78c87650b81af44f7108..8bcfb50f464c99a84500fc472c38eced9304bf0c 100644 (file)
@@ -4,5 +4,3 @@ interface h2-eth0
  description connection to r1 via sw2
  ip address 192.168.101.2/24
 !
-ip route 0.0.0.0/0 192.168.101.1
-!
diff --git a/tests/topotests/pim_acl/r11/mgmtd.conf b/tests/topotests/pim_acl/r11/mgmtd.conf
new file mode 100644 (file)
index 0000000..97bc66b
--- /dev/null
@@ -0,0 +1 @@
+ip route 0.0.0.0/0 192.168.101.1
index 137706d24576af6a18942c2fa9d0a4151c156b41..ca2c0cc1ffd797a0884e4543067f711b42203ede 100644 (file)
@@ -9,5 +9,3 @@ interface r11-eth0
  description connection to r1 via sw1
  ip address 192.168.101.11/24
 !
-ip route 0.0.0.0/0 192.168.101.1
-!
diff --git a/tests/topotests/pim_acl/r12/mgmtd.conf b/tests/topotests/pim_acl/r12/mgmtd.conf
new file mode 100644 (file)
index 0000000..97bc66b
--- /dev/null
@@ -0,0 +1 @@
+ip route 0.0.0.0/0 192.168.101.1
index bede1049067515fb91fda187a7d371a7cb29aeeb..87800a0eb81e9faa5a64480c0d6ccf79e2e94420 100644 (file)
@@ -9,5 +9,3 @@ interface r12-eth0
  description connection to r1 via sw1
  ip address 192.168.101.12/24
 !
-ip route 0.0.0.0/0 192.168.101.1
-!
diff --git a/tests/topotests/pim_acl/r13/mgmtd.conf b/tests/topotests/pim_acl/r13/mgmtd.conf
new file mode 100644 (file)
index 0000000..97bc66b
--- /dev/null
@@ -0,0 +1 @@
+ip route 0.0.0.0/0 192.168.101.1
index f9ff27abac3000ec47e8314b5362243f44ff0cc1..aaa800d84879f33e0f0a75397375c9050d1bc2fe 100644 (file)
@@ -9,5 +9,3 @@ interface r13-eth0
  description connection to r1 via sw1
  ip address 192.168.101.13/24
 !
-ip route 0.0.0.0/0 192.168.101.1
-!
diff --git a/tests/topotests/pim_acl/r14/mgmtd.conf b/tests/topotests/pim_acl/r14/mgmtd.conf
new file mode 100644 (file)
index 0000000..97bc66b
--- /dev/null
@@ -0,0 +1 @@
+ip route 0.0.0.0/0 192.168.101.1
index 8761b46206bbea165d5514953758b53d247dda86..afeb6b17e40d571ab1309c96404a17d0d0bbe0b3 100644 (file)
@@ -9,5 +9,3 @@ interface r14-eth0
  description connection to r1 via sw1
  ip address 192.168.101.14/24
 !
-ip route 0.0.0.0/0 192.168.101.1
-!
diff --git a/tests/topotests/pim_acl/r15/mgmtd.conf b/tests/topotests/pim_acl/r15/mgmtd.conf
new file mode 100644 (file)
index 0000000..97bc66b
--- /dev/null
@@ -0,0 +1 @@
+ip route 0.0.0.0/0 192.168.101.1
index f6909dd020ecc0e89e45d745a221770349efab32..4fed0c422264e69c633761953ad31bd86d234069 100644 (file)
@@ -9,5 +9,3 @@ interface r15-eth0
  description connection to r1 via sw1
  ip address 192.168.101.15/24
 !
-ip route 0.0.0.0/0 192.168.101.1
-!
diff --git a/tests/topotests/pim_igmp_vrf/h1/mgmtd.conf b/tests/topotests/pim_igmp_vrf/h1/mgmtd.conf
new file mode 100644 (file)
index 0000000..bbc854a
--- /dev/null
@@ -0,0 +1,3 @@
+!
+ip route 0.0.0.0/0 192.168.100.1
+!
index 3d6540d40c64bda8e70016f849751e169471bae0..5cc29813833a2ee11ba443f497b8f52f9d46585a 100644 (file)
@@ -6,5 +6,4 @@ interface h1-eth0
  description connection to r1 via sw1
  ip address 192.168.100.10/24
 !
-ip route 0.0.0.0/0 192.168.100.1
-!
+
diff --git a/tests/topotests/pim_igmp_vrf/h2/mgmtd.conf b/tests/topotests/pim_igmp_vrf/h2/mgmtd.conf
new file mode 100644 (file)
index 0000000..482e3fa
--- /dev/null
@@ -0,0 +1,3 @@
+!
+ip route 0.0.0.0/0 192.168.101.1
+!
index 95342f9e8ae39905df7a78c87650b81af44f7108..8bcfb50f464c99a84500fc472c38eced9304bf0c 100644 (file)
@@ -4,5 +4,3 @@ interface h2-eth0
  description connection to r1 via sw2
  ip address 192.168.101.2/24
 !
-ip route 0.0.0.0/0 192.168.101.1
-!
diff --git a/tests/topotests/pim_igmp_vrf/h3/mgmtd.conf b/tests/topotests/pim_igmp_vrf/h3/mgmtd.conf
new file mode 100644 (file)
index 0000000..bbc854a
--- /dev/null
@@ -0,0 +1,3 @@
+!
+ip route 0.0.0.0/0 192.168.100.1
+!
index ef99b1cd8f4efb5954c40ec2d670950d15308e4d..25676284a850137ee62a8016b731bf7cd88f9f9c 100644 (file)
@@ -6,5 +6,3 @@ interface h3-eth0
  description connection to r1 via sw3
  ip address 192.168.100.20/24
 !
-ip route 0.0.0.0/0 192.168.100.1
-!
diff --git a/tests/topotests/pim_igmp_vrf/h4/mgmtd.conf b/tests/topotests/pim_igmp_vrf/h4/mgmtd.conf
new file mode 100644 (file)
index 0000000..482e3fa
--- /dev/null
@@ -0,0 +1,3 @@
+!
+ip route 0.0.0.0/0 192.168.101.1
+!
index 6a2e466000ff25decdfd201e002fe8a5011a24cb..5db618ca8cb9ebfe7899c27bc7b48b3457496843 100644 (file)
@@ -4,5 +4,3 @@ interface h4-eth0
  description connection to r1 via sw4
  ip address 192.168.101.4/24
 !
-ip route 0.0.0.0/0 192.168.101.1
-!
diff --git a/tests/topotests/pim_igmp_vrf/r11/mgmtd.conf b/tests/topotests/pim_igmp_vrf/r11/mgmtd.conf
new file mode 100644 (file)
index 0000000..482e3fa
--- /dev/null
@@ -0,0 +1,3 @@
+!
+ip route 0.0.0.0/0 192.168.101.1
+!
index 137706d24576af6a18942c2fa9d0a4151c156b41..85a2d459f8047a216d5c90120478d6d142bf0324 100644 (file)
@@ -9,5 +9,4 @@ interface r11-eth0
  description connection to r1 via sw1
  ip address 192.168.101.11/24
 !
-ip route 0.0.0.0/0 192.168.101.1
-!
+
diff --git a/tests/topotests/pim_igmp_vrf/r12/mgmtd.conf b/tests/topotests/pim_igmp_vrf/r12/mgmtd.conf
new file mode 100644 (file)
index 0000000..482e3fa
--- /dev/null
@@ -0,0 +1,3 @@
+!
+ip route 0.0.0.0/0 192.168.101.1
+!
diff --git a/tests/topotests/rip_topo1/r3/mgmtd.conf b/tests/topotests/rip_topo1/r3/mgmtd.conf
new file mode 100644 (file)
index 0000000..3216fd2
--- /dev/null
@@ -0,0 +1 @@
+ip route 192.168.2.0/24 192.168.3.10
index 7f145b458313e82b4cb20e8da7d7d543a31f4b8b..15b454f7f500222363fbca914035c824158cd022 100644 (file)
@@ -12,8 +12,6 @@ interface r3-eth1
  ip address 193.1.2.2/24
  no link-detect
 !
-ip route 192.168.2.0/24 192.168.3.10
-!
 ip forwarding
 ipv6 forwarding
 !
index 7d59e8422f513d3356084f4ae7b943e3e0ceaa8e..6c25ac0d462eca7199905229c3a6dc4741eeaab0 100644 (file)
@@ -103,6 +103,7 @@ def setup_module(module):
     # Starting Routers
     #
     for i in range(1, 4):
+        net["r%s" % i].loadConf("mgmtd", "%s/r%s/mgmtd.conf" % (thisDir, i))
         net["r%s" % i].loadConf("zebra", "%s/r%s/zebra.conf" % (thisDir, i))
         net["r%s" % i].loadConf("ripd", "%s/r%s/ripd.conf" % (thisDir, i))
         tgen.gears["r%s" % i].start()
index 9a8f7cc1f7878413356f2eb1770931d17817ed16..0d36ee4712d934b451d0b21379a4b283b271c204 100644 (file)
@@ -60,6 +60,7 @@ def setup_module(mod):
     tgen.start_topology()
     router_list = tgen.routers()
     for rname, router in tgen.routers().items():
+        router.load_config(TopoRouter.RD_MGMTD, os.path.join(CWD, "{}/mgmtd.conf".format(rname)))
         router.load_config(TopoRouter.RD_ZEBRA, os.path.join(CWD, "{}/zebra.conf".format(rname)))
         router.load_config(
             TopoRouter.RD_SHARP, os.path.join(CWD, "{}/sharpd.conf".format(rname))
diff --git a/tests/topotests/zebra_rib/r1/mgmtd.conf b/tests/topotests/zebra_rib/r1/mgmtd.conf
new file mode 100644 (file)
index 0000000..e69de29