diff options
author | Ruben van Dijk <15885455+RubenNL@users.noreply.github.com> | 2025-04-23 21:48:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-24 05:48:40 +1000 |
commit | 29e8caf907063c2b4c4d2b65861ad595c10c8fb0 (patch) | |
tree | a123234938269e5b97f651e1d30eb890de6a9cee /plugins | |
parent | b0b3adfb53e3089b087731986eb8ea8f89dcf17e (diff) | |
download | vyos.vyos-main.tar.gz vyos.vyos-main.zip |
Co-authored-by: omnom62 <75066712+omnom62@users.noreply.github.com>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/module_utils/network/vyos/config/firewall_global/firewall_global.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/module_utils/network/vyos/config/firewall_global/firewall_global.py b/plugins/module_utils/network/vyos/config/firewall_global/firewall_global.py index e2a25e32..b7bff53e 100644 --- a/plugins/module_utils/network/vyos/config/firewall_global/firewall_global.py +++ b/plugins/module_utils/network/vyos/config/firewall_global/firewall_global.py @@ -373,6 +373,8 @@ class Firewall_global(ConfigBase): ) elif not opr and key in l_set: if key == "name" and self._is_grp_del(h, want, key): + if commands[-1] == cmd + " " + want["name"] + " " + self._grp_type(attr): + commands.pop() commands.append(cmd + " " + want["name"]) continue if not (h and in_target_not_none(h, key)) and not self._is_grp_del(h, want, "name"): @@ -435,6 +437,14 @@ class Firewall_global(ConfigBase): + " " + member[self._get_mem_type(type)], ) + elif not opr and not have: + commands.append( + cmd + + " " + + name + + " " + + self._grp_type(type), + ) return commands def _get_mem_type(self, group): |