diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2021-10-15 11:42:06 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2021-10-15 11:42:06 -0400 |
| commit | 45cfb2495f2fade4ab903b240bafb0b853549069 (patch) | |
| tree | 02ccc13f0b60f0aaac286f4ee990e222f0a69a51 | |
| parent | b4e7db4c348d7c08b4b992b18f3795a03f6c8561 (diff) | |
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 <sharpd@nvidia.com>
| -rw-r--r-- | tests/topotests/lib/common_config.py | 5 |
1 files changed, 5 insertions, 0 deletions
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)) |
