summaryrefslogtreecommitdiff
path: root/plugins/module_utils
diff options
context:
space:
mode:
authorRohit Thakur <rohitthakur2590@outlook.com>2020-04-28 20:06:16 +0530
committerRohit Thakur <rohitthakur2590@outlook.com>2020-04-28 20:06:16 +0530
commitbf9a91b4859e07c40b0a6aeb64b8ef6096af41b1 (patch)
tree69fdf2ce5a15e1505290e850e41341cdead88895 /plugins/module_utils
parent3f112a81a78f499d105632b4634d7feec0401161 (diff)
downloadvyos-ansible-collection-bf9a91b4859e07c40b0a6aeb64b8ef6096af41b1.tar.gz
vyos-ansible-collection-bf9a91b4859e07c40b0a6aeb64b8ef6096af41b1.zip
firewall_rules delete enhanced
Signed-off-by: Rohit Thakur <rohitthakur2590@outlook.com>
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"]: