Set default value for interface list include/exclude (#394)
Some checks are pending
Collection Docs / Build Ansible Docs (push) Waiting to run
Collection Docs / Publish Ansible Docs (push) Blocked by required conditions
nox / Run extra sanity tests (push) Waiting to run
nox / ansible-test (push) Waiting to run

Without a default value a pre-existing value isn't removed unless the
caller specifies the property.
This commit is contained in:
hansmi 2025-08-17 12:55:56 +02:00 committed by GitHub
parent db716c1368
commit fb070e4ac6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 10 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- api_info, api_modify - set default value for ``include`` and ``exclude`` properties in ``system note`` to an empty string (https://github.com/ansible-collections/community.routeros/pull/394).

View file

@ -441,8 +441,8 @@ PATHS = {
fully_understood=True,
fields={
'comment': KeyInfo(can_disable=True, remove_value=''),
'exclude': KeyInfo(),
'include': KeyInfo(),
'exclude': KeyInfo(default=''),
'include': KeyInfo(default=''),
'name': KeyInfo(),
},
),

View file

@ -470,8 +470,6 @@ class TestRouterosApiInfoModule(ModuleTestCase):
{
'.id': '*2000010',
'name': 'WAN',
'include': '',
'exclude': '',
'comment': 'defconf',
},
])
@ -523,24 +521,18 @@ class TestRouterosApiInfoModule(ModuleTestCase):
{
'.id': '*2000000',
'name': 'all',
'include': '',
'exclude': '',
'builtin': True,
'comment': 'contains all interfaces',
},
{
'.id': '*2000001',
'name': 'none',
'include': '',
'exclude': '',
'builtin': True,
'comment': 'contains no interfaces',
},
{
'.id': '*2000010',
'name': 'WAN',
'include': '',
'exclude': '',
'builtin': False,
'comment': 'defconf',
},