summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-07-03 15:44:46 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-07-03 15:44:46 +0300
commitdc3b2a6cb4fb960fc6c04087700cd757a417584e (patch)
tree3fe38534b3ff2b4881fc17a6ee411c477e5503d3 /plugins
parentcb41d42f49351f3c1d297f9961c7fdb836ffa48d (diff)
downloadvyos.vyos-dc3b2a6cb4fb960fc6c04087700cd757a417584e.tar.gz
vyos.vyos-dc3b2a6cb4fb960fc6c04087700cd757a417584e.zip
T8516: restore _state_deleted docstring, align test docstring and fixture
- restore the _state_deleted docstring lost in the L2-safeguard change, now documenting the address-only delete semantics - overridden test docstring said "delete interface stanzas" but the module now emits address-only deletes; align wording - quote loopback interface name in fixture for consistency with vyos_interfaces_config.cfg
Diffstat (limited to 'plugins')
-rw-r--r--plugins/module_utils/network/vyos/config/l3_interfaces/l3_interfaces.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/module_utils/network/vyos/config/l3_interfaces/l3_interfaces.py b/plugins/module_utils/network/vyos/config/l3_interfaces/l3_interfaces.py
index 2506abb5..f7b76af9 100644
--- a/plugins/module_utils/network/vyos/config/l3_interfaces/l3_interfaces.py
+++ b/plugins/module_utils/network/vyos/config/l3_interfaces/l3_interfaces.py
@@ -254,6 +254,16 @@ class L3_interfaces(ConfigBase):
return commands
def _state_deleted(self, want, have):
+ """The command generator when state is deleted
+
+ Deletes only the L3 address attributes (base interface and VIFs)
+ owned by this module, never the interface subtree, so L2 settings
+ are preserved.
+
+ :rtype: A list
+ :returns: the commands necessary to remove the current configuration
+ of the provided objects
+ """
commands = []
want_copy = deepcopy(remove_empties(want))
have_copy = deepcopy(have)