]> git.puffer.fish Git - matthieu/frr.git/commitdiff
tests: Add topojson route-map for nexthop
authorAshish Pant <ashish12pant@gmail.com>
Thu, 12 Sep 2019 04:30:00 +0000 (10:00 +0530)
committerAshish Pant <ashish12pant@gmail.com>
Thu, 3 Oct 2019 01:45:20 +0000 (07:15 +0530)
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>
Add route-map option for ipv6 nexthop

Fix typo in bgp configuration

tests/topotests/lib/bgp.py
tests/topotests/lib/common_config.py

index bfc34c25e435a5314d3f77ee67490ccdc47bcc61..41d6a326cf08003a3f5d62b33a0618e01201c3cc 100644 (file)
@@ -445,10 +445,10 @@ def __create_bgp_unicast_address_family(topo, input_dict, router, addr_type,
     bgp_data = input_dict[router]["bgp"]["address_family"]
     neigh_data = bgp_data[addr_type]["unicast"]["neighbor"]
 
-    for name, peer_dict in deepcopy(neigh_data).iteritems():
+    for peer_name, peer_dict in deepcopy(neigh_data).iteritems():
         for dest_link, peer in peer_dict["dest_link"].iteritems():
             deactivate = None
-            nh_details = topo[name]
+            nh_details = topo[peer_name]
             # Loopback interface
             if "source_link" in peer and peer["source_link"] == "lo":
                 for destRouterLink, data in sorted(nh_details["links"].
index e2f9ebda1866c3e2837d7323ac5ee07f44da779a..c413bf45c79076861a9f242dcbef517cb204075d 100644 (file)
@@ -1240,13 +1240,15 @@ def create_route_maps(tgen, input_dict, build=False):
 
                         # Weight
                         if weight:
-                            rmap_data.append("set weight {} \n".format(
+                            rmap_data.append("set weight {}".format(
                                 weight))
                         if ipv6_data:
-                            nexthop = ipv6_data.setdefault("nexthop",None)
+                            nexthop = ipv6_data.setdefault("nexthop", None)
                             if nexthop:
-                                rmap_data.append("set ipv6 next-hop \
-                                        {}".format(nexthop))
+                                rmap_data.append("set ipv6 next-hop {}".format(
+                                    nexthop
+                                ))
+
                     # Adding MATCH and SET sequence to RMAP if defined
                     if "match" in rmap_dict:
                         match_data = rmap_dict["match"]