From ab0aa4bd1a16b044f061053aa78b0fa865312545 Mon Sep 17 00:00:00 2001 From: omnom62 <75066712+omnom62@users.noreply.github.com> Date: Sun, 8 Mar 2026 20:53:15 +1000 Subject: T8104: Add static routes multiple next-hop targets (#444) * Mid fixes * Ready for testing * Fixing SR interface * Fix is ready * changelog * Integration tests for static_routes interface next-hop v.1.4+ WIP * branching 1.3- and 1.4+ * Integration tests for T8104 complete * Comments are resolved * Comments are resolved --- .../module_utils/network/vyos/facts/static_routes/static_routes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins/module_utils/network') diff --git a/plugins/module_utils/network/vyos/facts/static_routes/static_routes.py b/plugins/module_utils/network/vyos/facts/static_routes/static_routes.py index 99b3917b..710d91fe 100644 --- a/plugins/module_utils/network/vyos/facts/static_routes/static_routes.py +++ b/plugins/module_utils/network/vyos/facts/static_routes/static_routes.py @@ -164,9 +164,9 @@ class Static_routesFacts(object): elif dis >= 1: nh_info["enabled"] = False for element in nh_list: - if element["forward_router_address"] == nh_info["forward_router_address"]: - if "interface" in nh_info.keys(): - element["interface"] = nh_info["interface"] + if element.get("forward_router_address") == nh_info.get( + "forward_router_address", + ): if "admin_distance" in nh_info.keys(): element["admin_distance"] = nh_info["admin_distance"] if "enabled" in nh_info.keys(): @@ -174,4 +174,5 @@ class Static_routesFacts(object): nh_info = None if nh_info is not None: nh_list.append(nh_info) + nh_info = {} return nh_list -- cgit v1.2.3