summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshish Pant <ashish12pant@gmail.com>2019-09-12 10:00:00 +0530
committerAshish Pant <ashish12pant@gmail.com>2019-10-03 07:15:20 +0530
commit915bed88d83fa960c85e8f9ff8468438bc7c00d5 (patch)
tree885790d9ce6e512bd1c3321a843edfeca514dde5
parent161572bdf969ace6ae63f4383b3bfdc5db7413bf (diff)
tests: Add topojson route-map for nexthop
Signed-off-by: Ashish Pant <ashish12pant@gmail.com> Add route-map option for ipv6 nexthop Fix typo in bgp configuration
-rw-r--r--tests/topotests/lib/bgp.py4
-rw-r--r--tests/topotests/lib/common_config.py10
2 files changed, 8 insertions, 6 deletions
diff --git a/tests/topotests/lib/bgp.py b/tests/topotests/lib/bgp.py
index bfc34c25e4..41d6a326cf 100644
--- a/tests/topotests/lib/bgp.py
+++ b/tests/topotests/lib/bgp.py
@@ -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"].
diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py
index e2f9ebda18..c413bf45c7 100644
--- a/tests/topotests/lib/common_config.py
+++ b/tests/topotests/lib/common_config.py
@@ -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"]