summaryrefslogtreecommitdiff
path: root/plugins/module_utils
diff options
context:
space:
mode:
authoransible-zuul[bot] <48994755+ansible-zuul[bot]@users.noreply.github.com>2020-05-11 09:09:11 +0000
committerGitHub <noreply@github.com>2020-05-11 09:09:11 +0000
commiteff143edbc1347e608e4f462093bbcb9985bb57f (patch)
treef7efef1408d044761e4b3e3617414b795841254b /plugins/module_utils
parent3aff24d94d039a064090313c2894d7ee1e53fa71 (diff)
parent45715027fec488a74f7942cbc647ce7a6e0c69ed (diff)
downloadvyos-ansible-collection-eff143edbc1347e608e4f462093bbcb9985bb57f.tar.gz
vyos-ansible-collection-eff143edbc1347e608e4f462093bbcb9985bb57f.zip
Merge pull request #23 from rohitthakur2590/firewall_rules_del_changes
[VyOS]: Firewall rules 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/firewall_rules/firewall_rules.py25
1 files changed, 4 insertions, 21 deletions
diff --git a/plugins/module_utils/network/vyos/config/firewall_rules/firewall_rules.py b/plugins/module_utils/network/vyos/config/firewall_rules/firewall_rules.py
index e58593f..5c37741 100644
--- a/plugins/module_utils/network/vyos/config/firewall_rules/firewall_rules.py
+++ b/plugins/module_utils/network/vyos/config/firewall_rules/firewall_rules.py
@@ -235,28 +235,11 @@ class Firewall_rules(ConfigBase):
have, rs["name"], "r_list"
)
if h:
- w_rules = rs.get("rules") or []
- h_rules = h.get("rules") or []
- if w_rules and h_rules:
- for rule in w_rules:
- if self.search_r_sets_in_have(
- h_rules, rule["number"], "rules"
- ):
- commands.append(
- self._add_r_base_attrib(
- w["afi"],
- rs["name"],
- "number",
- rule,
- opr=False,
- )
- )
- else:
- commands.append(
- self._compute_command(
- w["afi"], h["name"], remove=True
- )
+ commands.append(
+ self._compute_command(
+ w["afi"], h["name"], remove=True
)
+ )
elif have:
for h in have:
if h["afi"] == w["afi"]: