diff options
author | ansible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com> | 2020-05-07 09:47:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-07 09:47:35 +0000 |
commit | 62d621f64c082d889950d48ccf4d1177aa24000a (patch) | |
tree | ee5a9a1886d259e892be851cbcf766be7c00ba87 /plugins/module_utils | |
parent | 439fcb4bb32f97a4d8f35bb30bc8c888b256476d (diff) | |
parent | 3ab82e0e018bf0ca02f14391d03e15b3c259da0a (diff) | |
download | vyos.vyos-62d621f64c082d889950d48ccf4d1177aa24000a.tar.gz vyos.vyos-62d621f64c082d889950d48ccf4d1177aa24000a.zip |
Merge pull request #30 from rohitthakur2590/static_routes_delete_changes
[VyOS]: Static routes Deleted state operation updated
Reviewed-by: https://github.com/apps/ansible-zuul
Diffstat (limited to 'plugins/module_utils')
-rw-r--r-- | plugins/module_utils/network/vyos/config/static_routes/static_routes.py | 8 |
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): |