]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: Convert one test to use interface based mpls config
authorDonald Sharp <sharpd@nvidia.com>
Wed, 29 Jun 2022 17:20:11 +0000 (13:20 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Mon, 8 Aug 2022 13:15:22 +0000 (09:15 -0400)
To prove that this works.  Modify a test that uses mpls to
turn on mpls for the interfaces that need mpls via the
new mpls command.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests/topotests/bgp_l3vpn_to_bgp_direct/customize.py
tests/topotests/bgp_l3vpn_to_bgp_direct/r1/zebra.conf
tests/topotests/bgp_l3vpn_to_bgp_direct/r2/zebra.conf
tests/topotests/bgp_l3vpn_to_bgp_direct/r3/zebra.conf
tests/topotests/bgp_l3vpn_to_bgp_direct/r4/zebra.conf

index 36bfdfe0682359a64a1aea2ba91af0bad5ac4a80..c0a5c7ad9cc8cefc6ba3ad88c26c8fc6afcd052f 100644 (file)
@@ -137,22 +137,6 @@ def ltemplatePreRouterStartHook():
     if tgen.hasmpls != True:
         logger.info("MPLS not available, skipping setup")
         return False
-    # configure r2 mpls interfaces
-    intfs = ["lo", "r2-eth0", "r2-eth1", "r2-eth2"]
-    for intf in intfs:
-        cc.doCmd(tgen, "r2", "echo 1 > /proc/sys/net/mpls/conf/{}/input".format(intf))
-    # configure MPLS
-    rtrs = ["r1", "r3", "r4"]
-    cmds = ["echo 1 > /proc/sys/net/mpls/conf/lo/input"]
-    for rtr in rtrs:
-        router = tgen.gears[rtr]
-        for cmd in cmds:
-            cc.doCmd(tgen, rtr, cmd)
-        intfs = ["lo", rtr + "-eth0", rtr + "-eth4"]
-        for intf in intfs:
-            cc.doCmd(
-                tgen, rtr, "echo 1 > /proc/sys/net/mpls/conf/{}/input".format(intf)
-            )
     logger.info("setup mpls input")
     return True
 
index 18f61e0c54c51e5d8db1bc77e5c5424475a1eec8..767e17e62c09ef6654f3c7cc044ce3b33d1cd6f2 100644 (file)
@@ -3,15 +3,18 @@ log file zebra.log
 hostname r1
 !
 interface lo
+ mpls
  ip address 1.1.1.1/32
 !
 interface r1-eth0
  description to sw0
+ mpls
  ip address 10.0.1.1/24
  no link-detect
 !
 interface r1-eth4
  description to ce1
+ mpls
  ip address 192.168.1.1/24
  no link-detect
 !
index dd1dbac32b8aba7ca95ec7e68c6d3d89f393cef8..829ac969e343e4dd8c676a9cfb17f115c46a5be2 100644 (file)
@@ -3,20 +3,24 @@ log file zebra.log
 hostname r2
 !
 interface lo
+ mpls
  ip address 2.2.2.2/32
 !
 interface r2-eth0
  description to sw0
+ mpls
  ip address 10.0.1.2/24
  no link-detect
 !
 interface r2-eth1
  description to sw1
+ mpls
  ip address 10.0.2.2/24
  no link-detect
 !
 interface r2-eth2
  description to sw2
+ mpls
  ip address 10.0.3.2/24
  no link-detect
 !
index 9dbc29024378a212d8570839e26fb0b61643e4f8..916dabf37d62121edce825a55ba0318a14bff10c 100644 (file)
@@ -3,10 +3,12 @@ log file zebra.log
 hostname r3
 !
 interface lo
+ mpls
  ip address 3.3.3.3/32
 !
 interface r3-eth0
  description to sw1
+ mpls
  ip address 10.0.2.3/24
  no link-detect
 !
@@ -17,6 +19,7 @@ interface r3-eth1
 !
 interface r3-eth4
  description to ce2
+ mpls
  ip address 192.168.1.1/24
  no link-detect
 !
index 415f03df51250e02db08e3d4cd870b0f32298d6e..e08ac86aec66dc28194dfaff58a396d8342f378d 100644 (file)
@@ -3,15 +3,18 @@ log file zebra.log
 hostname r4
 !
 interface lo
+ mpls
  ip address 4.4.4.4/32
 !
 interface r4-eth0
  description to sw1
+ mpls
  ip address 10.0.2.4/24
  no link-detect
 !
 interface r4-eth4
  description to ce3
+ mpls
  ip address 192.168.1.1/24
  no link-detect
 !