From e7ed146d0b3573752efc4c4211034d9545315c10 Mon Sep 17 00:00:00 2001 From: Yash Ranjan Date: Wed, 26 Jan 2022 23:18:59 -0800 Subject: [PATCH] tests: Modifying existing topotests to incorporate mgmtd changes. Signed-off-by: nguggarigoud --- .../all_protocol_startup/r1/mgmtd.conf | 45 +++++++++++++++++++ .../all_protocol_startup/r1/zebra.conf | 45 ------------------- .../r1/mgmtd.conf | 8 ++++ .../r1/zebra.conf | 7 --- .../test_bgp_conditional_advertisement.py | 3 ++ .../r1/mgmtd.conf | 1 + .../r1/zebra.conf | 2 - .../r1/mgmtd.conf | 3 ++ .../r1/zebra.conf | 2 - .../PE1/mgmtd.conf | 1 + .../PE1/zebra.conf | 2 - .../PE2/mgmtd.conf | 1 + .../PE2/zebra.conf | 2 - .../bgp_l3vpn_to_bgp_direct/r1/mgmtd.conf | 3 ++ .../bgp_l3vpn_to_bgp_direct/r1/zebra.conf | 2 - .../bgp_l3vpn_to_bgp_direct/r3/mgmtd.conf | 1 + .../bgp_l3vpn_to_bgp_direct/r3/zebra.conf | 2 - .../bgp_l3vpn_to_bgp_direct/r4/mgmtd.conf | 1 + .../bgp_l3vpn_to_bgp_direct/r4/zebra.conf | 2 - tests/topotests/bgp_lu_topo2/R3/mgmtd.conf | 1 + tests/topotests/bgp_lu_topo2/test_bgp_lu2.py | 3 ++ .../r2/mgmtd.conf | 3 ++ .../test_bgp_peer-type_multipath-relax.py | 3 ++ .../bgp_rfapi_basic_sanity/r1/mgmtd.conf | 3 ++ .../bgp_rfapi_basic_sanity/r1/zebra.conf | 2 - .../bgp_rfapi_basic_sanity/r3/mgmtd.conf | 3 ++ .../bgp_rfapi_basic_sanity/r3/zebra.conf | 2 - .../bgp_rfapi_basic_sanity/r4/mgmtd.conf | 3 ++ .../bgp_rfapi_basic_sanity/r4/zebra.conf | 2 - .../topotests/bgp_suppress_fib/r1/mgmtd.conf | 4 ++ .../topotests/bgp_suppress_fib/r1/zebra.conf | 5 +-- tests/topotests/config_timing/r1/mgmtd.conf | 0 .../config_timing/test_config_timing.py | 8 +++- tests/topotests/eigrp_topo1/r3/mgmtd.conf | 1 + tests/topotests/eigrp_topo1/r3/zebra.conf | 2 - .../topotests/eigrp_topo1/test_eigrp_topo1.py | 3 ++ .../topotests/isis_sr_te_topo1/dst/mgmtd.conf | 0 .../topotests/isis_sr_te_topo1/rt1/mgmtd.conf | 0 .../topotests/isis_sr_te_topo1/rt2/mgmtd.conf | 0 .../topotests/isis_sr_te_topo1/rt3/mgmtd.conf | 0 .../topotests/isis_sr_te_topo1/rt4/mgmtd.conf | 0 .../topotests/isis_sr_te_topo1/rt5/mgmtd.conf | 0 .../topotests/isis_sr_te_topo1/rt6/mgmtd.conf | 1 + .../topotests/isis_sr_te_topo1/rt6/zebra.conf | 2 - .../isis_sr_te_topo1/test_isis_sr_te_topo1.py | 3 ++ tests/topotests/lib/topogen.py | 3 +- tests/topotests/lib/topotest.py | 13 +++--- tests/topotests/nhrp_topo/r1/mgmtd.conf | 1 + tests/topotests/nhrp_topo/r1/zebra.conf | 1 - tests/topotests/nhrp_topo/r2/mgmtd.conf | 1 + tests/topotests/nhrp_topo/r2/zebra.conf | 1 - tests/topotests/nhrp_topo/test_nhrp_topo.py | 4 ++ tests/topotests/ospf6_topo2/r1/mgmtd.conf | 0 tests/topotests/ospf6_topo2/r2/mgmtd.conf | 0 tests/topotests/ospf6_topo2/r3/mgmtd.conf | 3 ++ tests/topotests/ospf6_topo2/r3/zebra.conf | 3 -- tests/topotests/ospf6_topo2/r4/mgmtd.conf | 0 .../test_ospf_instance_redistribute.py | 3 ++ .../topotests/ospf_sr_te_topo1/rt6/mgmtd.conf | 1 + .../topotests/ospf_sr_te_topo1/rt6/zebra.conf | 2 - .../ospf_sr_te_topo1/test_ospf_sr_te_topo1.py | 3 ++ .../topotests/ospf_suppress_fa/r3/mgmtd.conf | 5 +++ .../topotests/ospf_suppress_fa/r3/zebra.conf | 5 --- tests/topotests/pim_acl/h1/mgmtd.conf | 1 + tests/topotests/pim_acl/h1/zebra.conf | 2 - tests/topotests/pim_acl/h2/mgmtd.conf | 1 + tests/topotests/pim_acl/h2/zebra.conf | 2 - tests/topotests/pim_acl/r11/mgmtd.conf | 1 + tests/topotests/pim_acl/r11/zebra.conf | 2 - tests/topotests/pim_acl/r12/mgmtd.conf | 1 + tests/topotests/pim_acl/r12/zebra.conf | 2 - tests/topotests/pim_acl/r13/mgmtd.conf | 1 + tests/topotests/pim_acl/r13/zebra.conf | 2 - tests/topotests/pim_acl/r14/mgmtd.conf | 1 + tests/topotests/pim_acl/r14/zebra.conf | 2 - tests/topotests/pim_acl/r15/mgmtd.conf | 1 + tests/topotests/pim_acl/r15/zebra.conf | 2 - tests/topotests/pim_igmp_vrf/h1/mgmtd.conf | 3 ++ tests/topotests/pim_igmp_vrf/h1/zebra.conf | 3 +- tests/topotests/pim_igmp_vrf/h2/mgmtd.conf | 3 ++ tests/topotests/pim_igmp_vrf/h2/zebra.conf | 2 - tests/topotests/pim_igmp_vrf/h3/mgmtd.conf | 3 ++ tests/topotests/pim_igmp_vrf/h3/zebra.conf | 2 - tests/topotests/pim_igmp_vrf/h4/mgmtd.conf | 3 ++ tests/topotests/pim_igmp_vrf/h4/zebra.conf | 2 - tests/topotests/pim_igmp_vrf/r11/mgmtd.conf | 3 ++ tests/topotests/pim_igmp_vrf/r11/zebra.conf | 3 +- tests/topotests/pim_igmp_vrf/r12/mgmtd.conf | 3 ++ tests/topotests/rip_topo1/r3/mgmtd.conf | 1 + tests/topotests/rip_topo1/r3/zebra.conf | 2 - tests/topotests/rip_topo1/test_rip_topo1.py | 1 + .../test_verify_nh_resolution.py | 1 + tests/topotests/zebra_rib/r1/mgmtd.conf | 0 93 files changed, 165 insertions(+), 127 deletions(-) create mode 100644 tests/topotests/all_protocol_startup/r1/mgmtd.conf create mode 100644 tests/topotests/bgp_conditional_advertisement/r1/mgmtd.conf create mode 100644 tests/topotests/bgp_default_route_route_map_match/r1/mgmtd.conf create mode 100644 tests/topotests/bgp_default_route_route_map_match_set/r1/mgmtd.conf create mode 100644 tests/topotests/bgp_evpn_overlay_index_gateway/PE1/mgmtd.conf create mode 100644 tests/topotests/bgp_evpn_overlay_index_gateway/PE2/mgmtd.conf create mode 100644 tests/topotests/bgp_l3vpn_to_bgp_direct/r1/mgmtd.conf create mode 100644 tests/topotests/bgp_l3vpn_to_bgp_direct/r3/mgmtd.conf create mode 100644 tests/topotests/bgp_l3vpn_to_bgp_direct/r4/mgmtd.conf create mode 100644 tests/topotests/bgp_lu_topo2/R3/mgmtd.conf create mode 100644 tests/topotests/bgp_peer_type_multipath_relax/r2/mgmtd.conf create mode 100644 tests/topotests/bgp_rfapi_basic_sanity/r1/mgmtd.conf create mode 100644 tests/topotests/bgp_rfapi_basic_sanity/r3/mgmtd.conf create mode 100644 tests/topotests/bgp_rfapi_basic_sanity/r4/mgmtd.conf create mode 100644 tests/topotests/bgp_suppress_fib/r1/mgmtd.conf create mode 100644 tests/topotests/config_timing/r1/mgmtd.conf create mode 100644 tests/topotests/eigrp_topo1/r3/mgmtd.conf create mode 100644 tests/topotests/isis_sr_te_topo1/dst/mgmtd.conf create mode 100644 tests/topotests/isis_sr_te_topo1/rt1/mgmtd.conf create mode 100644 tests/topotests/isis_sr_te_topo1/rt2/mgmtd.conf create mode 100644 tests/topotests/isis_sr_te_topo1/rt3/mgmtd.conf create mode 100644 tests/topotests/isis_sr_te_topo1/rt4/mgmtd.conf create mode 100644 tests/topotests/isis_sr_te_topo1/rt5/mgmtd.conf create mode 100644 tests/topotests/isis_sr_te_topo1/rt6/mgmtd.conf create mode 100644 tests/topotests/nhrp_topo/r1/mgmtd.conf create mode 100644 tests/topotests/nhrp_topo/r2/mgmtd.conf create mode 100644 tests/topotests/ospf6_topo2/r1/mgmtd.conf create mode 100644 tests/topotests/ospf6_topo2/r2/mgmtd.conf create mode 100644 tests/topotests/ospf6_topo2/r3/mgmtd.conf create mode 100644 tests/topotests/ospf6_topo2/r4/mgmtd.conf create mode 100644 tests/topotests/ospf_sr_te_topo1/rt6/mgmtd.conf create mode 100644 tests/topotests/ospf_suppress_fa/r3/mgmtd.conf create mode 100644 tests/topotests/pim_acl/h1/mgmtd.conf create mode 100644 tests/topotests/pim_acl/h2/mgmtd.conf create mode 100644 tests/topotests/pim_acl/r11/mgmtd.conf create mode 100644 tests/topotests/pim_acl/r12/mgmtd.conf create mode 100644 tests/topotests/pim_acl/r13/mgmtd.conf create mode 100644 tests/topotests/pim_acl/r14/mgmtd.conf create mode 100644 tests/topotests/pim_acl/r15/mgmtd.conf create mode 100644 tests/topotests/pim_igmp_vrf/h1/mgmtd.conf create mode 100644 tests/topotests/pim_igmp_vrf/h2/mgmtd.conf create mode 100644 tests/topotests/pim_igmp_vrf/h3/mgmtd.conf create mode 100644 tests/topotests/pim_igmp_vrf/h4/mgmtd.conf create mode 100644 tests/topotests/pim_igmp_vrf/r11/mgmtd.conf create mode 100644 tests/topotests/pim_igmp_vrf/r12/mgmtd.conf create mode 100644 tests/topotests/rip_topo1/r3/mgmtd.conf create mode 100644 tests/topotests/zebra_rib/r1/mgmtd.conf diff --git a/tests/topotests/all_protocol_startup/r1/mgmtd.conf b/tests/topotests/all_protocol_startup/r1/mgmtd.conf new file mode 100644 index 0000000000..41fc61c5b2 --- /dev/null +++ b/tests/topotests/all_protocol_startup/r1/mgmtd.conf @@ -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 +! diff --git a/tests/topotests/all_protocol_startup/r1/zebra.conf b/tests/topotests/all_protocol_startup/r1/zebra.conf index c5ef79630e..6d1e9e4676 100644 --- a/tests/topotests/all_protocol_startup/r1/zebra.conf +++ b/tests/topotests/all_protocol_startup/r1/zebra.conf @@ -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 index 0000000000..c5b6ccbaf3 --- /dev/null +++ b/tests/topotests/bgp_conditional_advertisement/r1/mgmtd.conf @@ -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 +! diff --git a/tests/topotests/bgp_conditional_advertisement/r1/zebra.conf b/tests/topotests/bgp_conditional_advertisement/r1/zebra.conf index bb887e41ad..e289257cce 100644 --- a/tests/topotests/bgp_conditional_advertisement/r1/zebra.conf +++ b/tests/topotests/bgp_conditional_advertisement/r1/zebra.conf @@ -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 ! diff --git a/tests/topotests/bgp_conditional_advertisement/test_bgp_conditional_advertisement.py b/tests/topotests/bgp_conditional_advertisement/test_bgp_conditional_advertisement.py index 6153aee418..526a9d210d 100644 --- a/tests/topotests/bgp_conditional_advertisement/test_bgp_conditional_advertisement.py +++ b/tests/topotests/bgp_conditional_advertisement/test_bgp_conditional_advertisement.py @@ -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 index 0000000000..0f2eb6accc --- /dev/null +++ b/tests/topotests/bgp_default_route_route_map_match/r1/mgmtd.conf @@ -0,0 +1 @@ +ip route 192.168.13.0./24 Null0 diff --git a/tests/topotests/bgp_default_route_route_map_match/r1/zebra.conf b/tests/topotests/bgp_default_route_route_map_match/r1/zebra.conf index 9e581a7be7..0a283c06d5 100644 --- a/tests/topotests/bgp_default_route_route_map_match/r1/zebra.conf +++ b/tests/topotests/bgp_default_route_route_map_match/r1/zebra.conf @@ -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 index 0000000000..6105f1dd44 --- /dev/null +++ b/tests/topotests/bgp_default_route_route_map_match_set/r1/mgmtd.conf @@ -0,0 +1,3 @@ +! +ip route 192.168.13.0./24 Null0 +! diff --git a/tests/topotests/bgp_default_route_route_map_match_set/r1/zebra.conf b/tests/topotests/bgp_default_route_route_map_match_set/r1/zebra.conf index 9e581a7be7..0a283c06d5 100644 --- a/tests/topotests/bgp_default_route_route_map_match_set/r1/zebra.conf +++ b/tests/topotests/bgp_default_route_route_map_match_set/r1/zebra.conf @@ -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 index 0000000000..fffd0b038b --- /dev/null +++ b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/mgmtd.conf @@ -0,0 +1 @@ +ip route 10.100.0.2/32 10.0.1.2 diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra.conf b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra.conf index 99a2e89ef3..8278334add 100644 --- a/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra.conf +++ b/tests/topotests/bgp_evpn_overlay_index_gateway/PE1/zebra.conf @@ -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 index 0000000000..b78fa60e61 --- /dev/null +++ b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/mgmtd.conf @@ -0,0 +1 @@ +ip route 10.100.0.1/32 10.0.1.1 diff --git a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra.conf b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra.conf index b78cdcc512..0993727586 100644 --- a/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra.conf +++ b/tests/topotests/bgp_evpn_overlay_index_gateway/PE2/zebra.conf @@ -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 index 0000000000..b3f744734f --- /dev/null +++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/r1/mgmtd.conf @@ -0,0 +1,3 @@ +! +ip route 99.0.0.1/32 192.168.1.2 +! diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/r1/zebra.conf b/tests/topotests/bgp_l3vpn_to_bgp_direct/r1/zebra.conf index 18f61e0c54..188f14f7dd 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_direct/r1/zebra.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/r1/zebra.conf @@ -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 index 0000000000..07c127c429 --- /dev/null +++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/r3/mgmtd.conf @@ -0,0 +1 @@ +ip route 99.0.0.2/32 192.168.1.2 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/r3/zebra.conf b/tests/topotests/bgp_l3vpn_to_bgp_direct/r3/zebra.conf index 9dbc290243..7564aed892 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_direct/r3/zebra.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/r3/zebra.conf @@ -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 index 0000000000..358ec759c6 --- /dev/null +++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/r4/mgmtd.conf @@ -0,0 +1 @@ +ip route 99.0.0.3/32 192.168.1.2 diff --git a/tests/topotests/bgp_l3vpn_to_bgp_direct/r4/zebra.conf b/tests/topotests/bgp_l3vpn_to_bgp_direct/r4/zebra.conf index 415f03df51..c79e349130 100644 --- a/tests/topotests/bgp_l3vpn_to_bgp_direct/r4/zebra.conf +++ b/tests/topotests/bgp_l3vpn_to_bgp_direct/r4/zebra.conf @@ -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 index 0000000000..bcc40362d4 --- /dev/null +++ b/tests/topotests/bgp_lu_topo2/R3/mgmtd.conf @@ -0,0 +1 @@ +ip route 10.0.4.0/24 10.0.1.2 diff --git a/tests/topotests/bgp_lu_topo2/test_bgp_lu2.py b/tests/topotests/bgp_lu_topo2/test_bgp_lu2.py index fc9d2c433a..23b184ccbb 100644 --- a/tests/topotests/bgp_lu_topo2/test_bgp_lu2.py +++ b/tests/topotests/bgp_lu_topo2/test_bgp_lu2.py @@ -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 index 0000000000..86110c2b09 --- /dev/null +++ b/tests/topotests/bgp_peer_type_multipath_relax/r2/mgmtd.conf @@ -0,0 +1,3 @@ +! +ip route 198.51.100.0/24 10.0.2.2 +! 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 8321a57552..80aecfb432 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 @@ -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 index 0000000000..b3f744734f --- /dev/null +++ b/tests/topotests/bgp_rfapi_basic_sanity/r1/mgmtd.conf @@ -0,0 +1,3 @@ +! +ip route 99.0.0.1/32 192.168.1.2 +! diff --git a/tests/topotests/bgp_rfapi_basic_sanity/r1/zebra.conf b/tests/topotests/bgp_rfapi_basic_sanity/r1/zebra.conf index 18f61e0c54..188f14f7dd 100644 --- a/tests/topotests/bgp_rfapi_basic_sanity/r1/zebra.conf +++ b/tests/topotests/bgp_rfapi_basic_sanity/r1/zebra.conf @@ -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 index 0000000000..b2e2aa7efe --- /dev/null +++ b/tests/topotests/bgp_rfapi_basic_sanity/r3/mgmtd.conf @@ -0,0 +1,3 @@ +! +ip route 99.0.0.2/32 192.168.1.2 +! diff --git a/tests/topotests/bgp_rfapi_basic_sanity/r3/zebra.conf b/tests/topotests/bgp_rfapi_basic_sanity/r3/zebra.conf index 9dbc290243..7564aed892 100644 --- a/tests/topotests/bgp_rfapi_basic_sanity/r3/zebra.conf +++ b/tests/topotests/bgp_rfapi_basic_sanity/r3/zebra.conf @@ -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 index 0000000000..96001e6025 --- /dev/null +++ b/tests/topotests/bgp_rfapi_basic_sanity/r4/mgmtd.conf @@ -0,0 +1,3 @@ +! +ip route 99.0.0.3/32 192.168.1.2 +! diff --git a/tests/topotests/bgp_rfapi_basic_sanity/r4/zebra.conf b/tests/topotests/bgp_rfapi_basic_sanity/r4/zebra.conf index 415f03df51..c79e349130 100644 --- a/tests/topotests/bgp_rfapi_basic_sanity/r4/zebra.conf +++ b/tests/topotests/bgp_rfapi_basic_sanity/r4/zebra.conf @@ -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 index 0000000000..56278750c0 --- /dev/null +++ b/tests/topotests/bgp_suppress_fib/r1/mgmtd.conf @@ -0,0 +1,4 @@ +! +ip route 40.0.0.0/8 blackhole +ip route 50.0.0.0/8 blackhole +! diff --git a/tests/topotests/bgp_suppress_fib/r1/zebra.conf b/tests/topotests/bgp_suppress_fib/r1/zebra.conf index 7b442164ff..3b8e6ffdc7 100644 --- a/tests/topotests/bgp_suppress_fib/r1/zebra.conf +++ b/tests/topotests/bgp_suppress_fib/r1/zebra.conf @@ -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 index 0000000000..e69de29bb2 diff --git a/tests/topotests/config_timing/test_config_timing.py b/tests/topotests/config_timing/test_config_timing.py index 7ab8619b01..d86d05b89e 100644 --- a/tests/topotests/config_timing/test_config_timing.py +++ b/tests/topotests/config_timing/test_config_timing.py @@ -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 index 0000000000..3216fd2eb1 --- /dev/null +++ b/tests/topotests/eigrp_topo1/r3/mgmtd.conf @@ -0,0 +1 @@ +ip route 192.168.2.0/24 192.168.3.10 diff --git a/tests/topotests/eigrp_topo1/r3/zebra.conf b/tests/topotests/eigrp_topo1/r3/zebra.conf index 7f145b4583..15b454f7f5 100644 --- a/tests/topotests/eigrp_topo1/r3/zebra.conf +++ b/tests/topotests/eigrp_topo1/r3/zebra.conf @@ -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 ! diff --git a/tests/topotests/eigrp_topo1/test_eigrp_topo1.py b/tests/topotests/eigrp_topo1/test_eigrp_topo1.py index 8b7c9fc6d7..59a2a2a28e 100644 --- a/tests/topotests/eigrp_topo1/test_eigrp_topo1.py +++ b/tests/topotests/eigrp_topo1/test_eigrp_topo1.py @@ -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 index 0000000000..e69de29bb2 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 index 0000000000..e69de29bb2 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 index 0000000000..e69de29bb2 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 index 0000000000..e69de29bb2 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 index 0000000000..e69de29bb2 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 index 0000000000..e69de29bb2 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 index 0000000000..13ea93cc18 --- /dev/null +++ b/tests/topotests/isis_sr_te_topo1/rt6/mgmtd.conf @@ -0,0 +1 @@ +ip route 9.9.9.2/32 10.0.11.2 diff --git a/tests/topotests/isis_sr_te_topo1/rt6/zebra.conf b/tests/topotests/isis_sr_te_topo1/rt6/zebra.conf index f2f1a3eefe..8445d56eb8 100644 --- a/tests/topotests/isis_sr_te_topo1/rt6/zebra.conf +++ b/tests/topotests/isis_sr_te_topo1/rt6/zebra.conf @@ -21,7 +21,5 @@ interface eth-dst ! ip forwarding ! -ip route 9.9.9.2/32 10.0.11.2 -! line vty ! diff --git a/tests/topotests/isis_sr_te_topo1/test_isis_sr_te_topo1.py b/tests/topotests/isis_sr_te_topo1/test_isis_sr_te_topo1.py index fb987ba489..47b257bbb3 100755 --- a/tests/topotests/isis_sr_te_topo1/test_isis_sr_te_topo1.py +++ b/tests/topotests/isis_sr_te_topo1/test_isis_sr_te_topo1.py @@ -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)) ) diff --git a/tests/topotests/lib/topogen.py b/tests/topotests/lib/topogen.py index 3bb63a017b..9c72adc744 100644 --- a/tests/topotests/lib/topogen.py +++ b/tests/topotests/lib/topogen.py @@ -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 diff --git a/tests/topotests/lib/topotest.py b/tests/topotests/lib/topotest.py index dc50d6b0c5..7c01728c80 100644 --- a/tests/topotests/lib/topotest.py +++ b/tests/topotests/lib/topotest.py @@ -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 index 0000000000..6b98c8b992 --- /dev/null +++ b/tests/topotests/nhrp_topo/r1/mgmtd.conf @@ -0,0 +1 @@ +ip route 10.2.1.0/24 10.1.1.3 diff --git a/tests/topotests/nhrp_topo/r1/zebra.conf b/tests/topotests/nhrp_topo/r1/zebra.conf index b45670fcb2..8606335c0c 100644 --- a/tests/topotests/nhrp_topo/r1/zebra.conf +++ b/tests/topotests/nhrp_topo/r1/zebra.conf @@ -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 index 0000000000..6ac63e6b83 --- /dev/null +++ b/tests/topotests/nhrp_topo/r2/mgmtd.conf @@ -0,0 +1 @@ +ip route 10.1.1.0/24 10.2.1.3 diff --git a/tests/topotests/nhrp_topo/r2/zebra.conf b/tests/topotests/nhrp_topo/r2/zebra.conf index 9f40d4d72e..5b7e136284 100644 --- a/tests/topotests/nhrp_topo/r2/zebra.conf +++ b/tests/topotests/nhrp_topo/r2/zebra.conf @@ -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 diff --git a/tests/topotests/nhrp_topo/test_nhrp_topo.py b/tests/topotests/nhrp_topo/test_nhrp_topo.py index e6e551906a..d1ba5a0ec2 100644 --- a/tests/topotests/nhrp_topo/test_nhrp_topo.py +++ b/tests/topotests/nhrp_topo/test_nhrp_topo.py @@ -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 index 0000000000..e69de29bb2 diff --git a/tests/topotests/ospf6_topo2/r2/mgmtd.conf b/tests/topotests/ospf6_topo2/r2/mgmtd.conf new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/topotests/ospf6_topo2/r3/mgmtd.conf b/tests/topotests/ospf6_topo2/r3/mgmtd.conf new file mode 100644 index 0000000000..a917bdf6fb --- /dev/null +++ b/tests/topotests/ospf6_topo2/r3/mgmtd.conf @@ -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 diff --git a/tests/topotests/ospf6_topo2/r3/zebra.conf b/tests/topotests/ospf6_topo2/r3/zebra.conf index dea2fe4778..d54130742a 100644 --- a/tests/topotests/ospf6_topo2/r3/zebra.conf +++ b/tests/topotests/ospf6_topo2/r3/zebra.conf @@ -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 index 0000000000..e69de29bb2 diff --git a/tests/topotests/ospf_instance_redistribute/test_ospf_instance_redistribute.py b/tests/topotests/ospf_instance_redistribute/test_ospf_instance_redistribute.py index 88c236d7a0..24223c9e1e 100644 --- a/tests/topotests/ospf_instance_redistribute/test_ospf_instance_redistribute.py +++ b/tests/topotests/ospf_instance_redistribute/test_ospf_instance_redistribute.py @@ -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 index 0000000000..13ea93cc18 --- /dev/null +++ b/tests/topotests/ospf_sr_te_topo1/rt6/mgmtd.conf @@ -0,0 +1 @@ +ip route 9.9.9.2/32 10.0.11.2 diff --git a/tests/topotests/ospf_sr_te_topo1/rt6/zebra.conf b/tests/topotests/ospf_sr_te_topo1/rt6/zebra.conf index c556aa3681..565eb98a58 100644 --- a/tests/topotests/ospf_sr_te_topo1/rt6/zebra.conf +++ b/tests/topotests/ospf_sr_te_topo1/rt6/zebra.conf @@ -32,7 +32,5 @@ interface eth-dst ! ip forwarding ! -ip route 9.9.9.2/32 10.0.11.2 -! line vty ! diff --git a/tests/topotests/ospf_sr_te_topo1/test_ospf_sr_te_topo1.py b/tests/topotests/ospf_sr_te_topo1/test_ospf_sr_te_topo1.py index 6e992674ac..2e329c8ed3 100755 --- a/tests/topotests/ospf_sr_te_topo1/test_ospf_sr_te_topo1.py +++ b/tests/topotests/ospf_sr_te_topo1/test_ospf_sr_te_topo1.py @@ -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 index 0000000000..83ffc93071 --- /dev/null +++ b/tests/topotests/ospf_suppress_fa/r3/mgmtd.conf @@ -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 +! diff --git a/tests/topotests/ospf_suppress_fa/r3/zebra.conf b/tests/topotests/ospf_suppress_fa/r3/zebra.conf index f76cbf74d2..1e38a59fd0 100644 --- a/tests/topotests/ospf_suppress_fa/r3/zebra.conf +++ b/tests/topotests/ospf_suppress_fa/r3/zebra.conf @@ -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 index 0000000000..4d78980e51 --- /dev/null +++ b/tests/topotests/pim_acl/h1/mgmtd.conf @@ -0,0 +1 @@ +ip route 0.0.0.0/0 192.168.100.1 diff --git a/tests/topotests/pim_acl/h1/zebra.conf b/tests/topotests/pim_acl/h1/zebra.conf index 3d6540d40c..08e3980ff4 100644 --- a/tests/topotests/pim_acl/h1/zebra.conf +++ b/tests/topotests/pim_acl/h1/zebra.conf @@ -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 index 0000000000..97bc66ba28 --- /dev/null +++ b/tests/topotests/pim_acl/h2/mgmtd.conf @@ -0,0 +1 @@ +ip route 0.0.0.0/0 192.168.101.1 diff --git a/tests/topotests/pim_acl/h2/zebra.conf b/tests/topotests/pim_acl/h2/zebra.conf index 95342f9e8a..8bcfb50f46 100644 --- a/tests/topotests/pim_acl/h2/zebra.conf +++ b/tests/topotests/pim_acl/h2/zebra.conf @@ -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 index 0000000000..97bc66ba28 --- /dev/null +++ b/tests/topotests/pim_acl/r11/mgmtd.conf @@ -0,0 +1 @@ +ip route 0.0.0.0/0 192.168.101.1 diff --git a/tests/topotests/pim_acl/r11/zebra.conf b/tests/topotests/pim_acl/r11/zebra.conf index 137706d245..ca2c0cc1ff 100644 --- a/tests/topotests/pim_acl/r11/zebra.conf +++ b/tests/topotests/pim_acl/r11/zebra.conf @@ -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 index 0000000000..97bc66ba28 --- /dev/null +++ b/tests/topotests/pim_acl/r12/mgmtd.conf @@ -0,0 +1 @@ +ip route 0.0.0.0/0 192.168.101.1 diff --git a/tests/topotests/pim_acl/r12/zebra.conf b/tests/topotests/pim_acl/r12/zebra.conf index bede104906..87800a0eb8 100644 --- a/tests/topotests/pim_acl/r12/zebra.conf +++ b/tests/topotests/pim_acl/r12/zebra.conf @@ -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 index 0000000000..97bc66ba28 --- /dev/null +++ b/tests/topotests/pim_acl/r13/mgmtd.conf @@ -0,0 +1 @@ +ip route 0.0.0.0/0 192.168.101.1 diff --git a/tests/topotests/pim_acl/r13/zebra.conf b/tests/topotests/pim_acl/r13/zebra.conf index f9ff27abac..aaa800d848 100644 --- a/tests/topotests/pim_acl/r13/zebra.conf +++ b/tests/topotests/pim_acl/r13/zebra.conf @@ -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 index 0000000000..97bc66ba28 --- /dev/null +++ b/tests/topotests/pim_acl/r14/mgmtd.conf @@ -0,0 +1 @@ +ip route 0.0.0.0/0 192.168.101.1 diff --git a/tests/topotests/pim_acl/r14/zebra.conf b/tests/topotests/pim_acl/r14/zebra.conf index 8761b46206..afeb6b17e4 100644 --- a/tests/topotests/pim_acl/r14/zebra.conf +++ b/tests/topotests/pim_acl/r14/zebra.conf @@ -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 index 0000000000..97bc66ba28 --- /dev/null +++ b/tests/topotests/pim_acl/r15/mgmtd.conf @@ -0,0 +1 @@ +ip route 0.0.0.0/0 192.168.101.1 diff --git a/tests/topotests/pim_acl/r15/zebra.conf b/tests/topotests/pim_acl/r15/zebra.conf index f6909dd020..4fed0c4222 100644 --- a/tests/topotests/pim_acl/r15/zebra.conf +++ b/tests/topotests/pim_acl/r15/zebra.conf @@ -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 index 0000000000..bbc854a773 --- /dev/null +++ b/tests/topotests/pim_igmp_vrf/h1/mgmtd.conf @@ -0,0 +1,3 @@ +! +ip route 0.0.0.0/0 192.168.100.1 +! diff --git a/tests/topotests/pim_igmp_vrf/h1/zebra.conf b/tests/topotests/pim_igmp_vrf/h1/zebra.conf index 3d6540d40c..5cc2981383 100644 --- a/tests/topotests/pim_igmp_vrf/h1/zebra.conf +++ b/tests/topotests/pim_igmp_vrf/h1/zebra.conf @@ -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 index 0000000000..482e3fa325 --- /dev/null +++ b/tests/topotests/pim_igmp_vrf/h2/mgmtd.conf @@ -0,0 +1,3 @@ +! +ip route 0.0.0.0/0 192.168.101.1 +! diff --git a/tests/topotests/pim_igmp_vrf/h2/zebra.conf b/tests/topotests/pim_igmp_vrf/h2/zebra.conf index 95342f9e8a..8bcfb50f46 100644 --- a/tests/topotests/pim_igmp_vrf/h2/zebra.conf +++ b/tests/topotests/pim_igmp_vrf/h2/zebra.conf @@ -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 index 0000000000..bbc854a773 --- /dev/null +++ b/tests/topotests/pim_igmp_vrf/h3/mgmtd.conf @@ -0,0 +1,3 @@ +! +ip route 0.0.0.0/0 192.168.100.1 +! diff --git a/tests/topotests/pim_igmp_vrf/h3/zebra.conf b/tests/topotests/pim_igmp_vrf/h3/zebra.conf index ef99b1cd8f..25676284a8 100644 --- a/tests/topotests/pim_igmp_vrf/h3/zebra.conf +++ b/tests/topotests/pim_igmp_vrf/h3/zebra.conf @@ -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 index 0000000000..482e3fa325 --- /dev/null +++ b/tests/topotests/pim_igmp_vrf/h4/mgmtd.conf @@ -0,0 +1,3 @@ +! +ip route 0.0.0.0/0 192.168.101.1 +! diff --git a/tests/topotests/pim_igmp_vrf/h4/zebra.conf b/tests/topotests/pim_igmp_vrf/h4/zebra.conf index 6a2e466000..5db618ca8c 100644 --- a/tests/topotests/pim_igmp_vrf/h4/zebra.conf +++ b/tests/topotests/pim_igmp_vrf/h4/zebra.conf @@ -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 index 0000000000..482e3fa325 --- /dev/null +++ b/tests/topotests/pim_igmp_vrf/r11/mgmtd.conf @@ -0,0 +1,3 @@ +! +ip route 0.0.0.0/0 192.168.101.1 +! diff --git a/tests/topotests/pim_igmp_vrf/r11/zebra.conf b/tests/topotests/pim_igmp_vrf/r11/zebra.conf index 137706d245..85a2d459f8 100644 --- a/tests/topotests/pim_igmp_vrf/r11/zebra.conf +++ b/tests/topotests/pim_igmp_vrf/r11/zebra.conf @@ -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 index 0000000000..482e3fa325 --- /dev/null +++ b/tests/topotests/pim_igmp_vrf/r12/mgmtd.conf @@ -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 index 0000000000..3216fd2eb1 --- /dev/null +++ b/tests/topotests/rip_topo1/r3/mgmtd.conf @@ -0,0 +1 @@ +ip route 192.168.2.0/24 192.168.3.10 diff --git a/tests/topotests/rip_topo1/r3/zebra.conf b/tests/topotests/rip_topo1/r3/zebra.conf index 7f145b4583..15b454f7f5 100644 --- a/tests/topotests/rip_topo1/r3/zebra.conf +++ b/tests/topotests/rip_topo1/r3/zebra.conf @@ -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 ! diff --git a/tests/topotests/rip_topo1/test_rip_topo1.py b/tests/topotests/rip_topo1/test_rip_topo1.py index 7d59e8422f..6c25ac0d46 100644 --- a/tests/topotests/rip_topo1/test_rip_topo1.py +++ b/tests/topotests/rip_topo1/test_rip_topo1.py @@ -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() diff --git a/tests/topotests/zebra_nht_resolution/test_verify_nh_resolution.py b/tests/topotests/zebra_nht_resolution/test_verify_nh_resolution.py index 9a8f7cc1f7..0d36ee4712 100644 --- a/tests/topotests/zebra_nht_resolution/test_verify_nh_resolution.py +++ b/tests/topotests/zebra_nht_resolution/test_verify_nh_resolution.py @@ -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 index 0000000000..e69de29bb2 -- 2.39.5