summaryrefslogtreecommitdiff
path: root/plugins/module_utils
diff options
context:
space:
mode:
authorRohit Thakur <rohitthakur2590@outlook.com>2020-05-06 20:20:08 +0530
committerRohit Thakur <rohitthakur2590@outlook.com>2020-05-06 20:20:08 +0530
commit3ab82e0e018bf0ca02f14391d03e15b3c259da0a (patch)
tree2181da8342fbe2d47b46ff78b4ca532ed68c3f34 /plugins/module_utils
parent77e8b041b2983415ac36eb6264f6e385ac87b074 (diff)
downloadvyos-ansible-collection-3ab82e0e018bf0ca02f14391d03e15b3c259da0a.tar.gz
vyos-ansible-collection-3ab82e0e018bf0ca02f14391d03e15b3c259da0a.zip
linters fix
Signed-off-by: Rohit Thakur <rohitthakur2590@outlook.com>
Diffstat (limited to 'plugins/module_utils')
-rw-r--r--plugins/module_utils/network/vyos/config/static_routes/static_routes.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/plugins/module_utils/network/vyos/config/static_routes/static_routes.py b/plugins/module_utils/network/vyos/config/static_routes/static_routes.py
index e93d4ee..b359dbb 100644
--- a/plugins/module_utils/network/vyos/config/static_routes/static_routes.py
+++ b/plugins/module_utils/network/vyos/config/static_routes/static_routes.py
@@ -160,7 +160,7 @@ class Static_routes(ConfigBase):
routes = self._get_routes(want)
for r in routes:
h_item = self.search_route_in_have(have, r["dest"])
- if self.state == "merged" or self.state == "rendered":
+ if self.state in ("merged", "rendered"):
commands.extend(self._state_merged(want=r, have=h_item))
elif self.state == "replaced":
commands.extend(self._state_replaced(want=r, have=h_item))
@@ -253,12 +253,6 @@ class Static_routes(ConfigBase):
afi=item["afi"], remove=True
)
)
- for r in routes:
- h_route = self.search_route_in_have(have, r["dest"])
- if h_route:
- commands.extend(
- self._render_updates(r, h_route, opr=False)
- )
else:
routes = self._get_routes(have)
if self._is_ip_route_exist(routes):