diff options
author | Rohit Thakur <rohitthakur2590@outlook.com> | 2020-04-28 20:06:16 +0530 |
---|---|---|
committer | Rohit Thakur <rohitthakur2590@outlook.com> | 2020-04-28 20:06:16 +0530 |
commit | bf9a91b4859e07c40b0a6aeb64b8ef6096af41b1 (patch) | |
tree | 69fdf2ce5a15e1505290e850e41341cdead88895 /plugins/module_utils | |
parent | 3f112a81a78f499d105632b4634d7feec0401161 (diff) | |
download | vyos-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.py | 25 |
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"]: |