summaryrefslogtreecommitdiff
path: root/plugins/module_utils/network
diff options
context:
space:
mode:
authoromnom62 <75066712+omnom62@users.noreply.github.com>2026-03-08 20:53:15 +1000
committerGitHub <noreply@github.com>2026-03-08 12:53:15 +0200
commitab0aa4bd1a16b044f061053aa78b0fa865312545 (patch)
treefc8c29f22e4c35738ff24bc3cc5cc254d61e9f75 /plugins/module_utils/network
parenta8e5dac21090e9b0ddf876214a9a1522079ecde1 (diff)
downloadvyos.vyos-ab0aa4bd1a16b044f061053aa78b0fa865312545.tar.gz
vyos.vyos-ab0aa4bd1a16b044f061053aa78b0fa865312545.zip
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
Diffstat (limited to 'plugins/module_utils/network')
-rw-r--r--plugins/module_utils/network/vyos/facts/static_routes/static_routes.py7
1 files changed, 4 insertions, 3 deletions
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