From ef8ddefce682656a1f1f1155707cfcff67a29c0f Mon Sep 17 00:00:00 2001 From: Ruben van Dijk <15885455+RubenNL@users.noreply.github.com> Date: Thu, 3 Apr 2025 00:26:52 +0200 Subject: T7284: Allow deletion of firewall description (#406) * T7284 (Delete firewall description not possible) Added failing tests. * T7284 (Delete firewall description not possible) Functional code. * T7284 (Delete firewall description not possible) Fixed pep8. * T7284 (Delete firewall description not possible) Added changelog. * T7284 (Delete firewall description not possible) Fixed changelog. --- tests/unit/modules/network/vyos/test_vyos_firewall_global.py | 3 ++- tests/unit/modules/network/vyos/test_vyos_firewall_global14.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/unit') diff --git a/tests/unit/modules/network/vyos/test_vyos_firewall_global.py b/tests/unit/modules/network/vyos/test_vyos_firewall_global.py index 2ecd0621..481cc1dd 100644 --- a/tests/unit/modules/network/vyos/test_vyos_firewall_global.py +++ b/tests/unit/modules/network/vyos/test_vyos_firewall_global.py @@ -282,7 +282,7 @@ class TestVyosFirewallGlobalModule(TestVyosModule): dict( afi="ipv4", name="RND", - description="This group has the Management network addresses", + # Deleted the description here. members=[dict(address="192.0.2.0/24")], ), dict( @@ -311,6 +311,7 @@ class TestVyosFirewallGlobalModule(TestVyosModule): "delete firewall group address-group RND-HOSTS address 192.0.2.5", "set firewall group address-group RND-HOSTS address 192.0.2.7", "set firewall group address-group RND-HOSTS address 192.0.2.9", + "delete firewall group network-group RND description", "delete firewall group ipv6-address-group LOCAL-v6 address fdec:2503:89d6:59b3::1", "set firewall group ipv6-address-group LOCAL-v6 address fdec:2503:89d6:59b3::2", "delete firewall group port-group SSH port 22", diff --git a/tests/unit/modules/network/vyos/test_vyos_firewall_global14.py b/tests/unit/modules/network/vyos/test_vyos_firewall_global14.py index f4ae4add..aae4aa83 100644 --- a/tests/unit/modules/network/vyos/test_vyos_firewall_global14.py +++ b/tests/unit/modules/network/vyos/test_vyos_firewall_global14.py @@ -285,7 +285,7 @@ class TestVyosFirewallRulesModule14(TestVyosModule): dict( afi="ipv4", name="RND", - description="This group has the Management network addresses", + # Deleted the description here. members=[dict(address="192.0.2.0/24")], ), dict( @@ -317,6 +317,7 @@ class TestVyosFirewallRulesModule14(TestVyosModule): "set firewall global-options state-policy invalid action 'reject'", "set firewall group address-group RND-HOSTS address 192.0.2.7", "set firewall group address-group RND-HOSTS address 192.0.2.9", + "delete firewall group network-group RND description", "delete firewall group ipv6-address-group LOCAL-v6 address fdec:2503:89d6:59b3::1", "set firewall group ipv6-address-group LOCAL-v6 address fdec:2503:89d6:59b3::2", "delete firewall group port-group SSH port 22", -- cgit v1.2.3