From: Donald Sharp Date: Fri, 15 Oct 2021 15:42:06 +0000 (-0400) Subject: lib: Add `metric-type` to possible set operations X-Git-Tag: base_8.2~319^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=45cfb2495f2fade4ab903b240bafb0b853549069;p=matthieu%2Ffrr.git lib: Add `metric-type` to possible set operations Several tests used the route_map_create functionality with `metric-type` but never bothered to add the backend code to ensure it works correctly. Add it in so it can be used. Signed-off-by: Donald Sharp --- diff --git a/tests/topotests/lib/common_config.py b/tests/topotests/lib/common_config.py index 1bce3c6bb2..cf8efdea16 100644 --- a/tests/topotests/lib/common_config.py +++ b/tests/topotests/lib/common_config.py @@ -2552,6 +2552,7 @@ def create_route_maps(tgen, input_dict, build=False): nexthop = set_data.setdefault("nexthop", None) origin = set_data.setdefault("origin", None) ext_comm_list = set_data.setdefault("extcommunity", {}) + metrictype = set_data.setdefault("metric-type", {}) # Local Preference if local_preference: @@ -2559,6 +2560,10 @@ def create_route_maps(tgen, input_dict, build=False): "set local-preference {}".format(local_preference) ) + # Metric-Type + if metrictype: + rmap_data.append("set metric-type {}\n".format(metrictype)) + # Metric if metric: rmap_data.append("set metric {} \n".format(metric))