mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-08-18 16:48:45 +02:00
Set default value for interface list include/exclude (#394)
Without a default value a pre-existing value isn't removed unless the caller specifies the property.
This commit is contained in:
parent
db716c1368
commit
fb070e4ac6
3 changed files with 4 additions and 10 deletions
2
changelogs/fragments/394-iface-list-defaults.yml
Normal file
2
changelogs/fragments/394-iface-list-defaults.yml
Normal 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).
|
|
@ -441,8 +441,8 @@ PATHS = {
|
||||||
fully_understood=True,
|
fully_understood=True,
|
||||||
fields={
|
fields={
|
||||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||||
'exclude': KeyInfo(),
|
'exclude': KeyInfo(default=''),
|
||||||
'include': KeyInfo(),
|
'include': KeyInfo(default=''),
|
||||||
'name': KeyInfo(),
|
'name': KeyInfo(),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
@ -470,8 +470,6 @@ class TestRouterosApiInfoModule(ModuleTestCase):
|
||||||
{
|
{
|
||||||
'.id': '*2000010',
|
'.id': '*2000010',
|
||||||
'name': 'WAN',
|
'name': 'WAN',
|
||||||
'include': '',
|
|
||||||
'exclude': '',
|
|
||||||
'comment': 'defconf',
|
'comment': 'defconf',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
@ -523,24 +521,18 @@ class TestRouterosApiInfoModule(ModuleTestCase):
|
||||||
{
|
{
|
||||||
'.id': '*2000000',
|
'.id': '*2000000',
|
||||||
'name': 'all',
|
'name': 'all',
|
||||||
'include': '',
|
|
||||||
'exclude': '',
|
|
||||||
'builtin': True,
|
'builtin': True,
|
||||||
'comment': 'contains all interfaces',
|
'comment': 'contains all interfaces',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'.id': '*2000001',
|
'.id': '*2000001',
|
||||||
'name': 'none',
|
'name': 'none',
|
||||||
'include': '',
|
|
||||||
'exclude': '',
|
|
||||||
'builtin': True,
|
'builtin': True,
|
||||||
'comment': 'contains no interfaces',
|
'comment': 'contains no interfaces',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'.id': '*2000010',
|
'.id': '*2000010',
|
||||||
'name': 'WAN',
|
'name': 'WAN',
|
||||||
'include': '',
|
|
||||||
'exclude': '',
|
|
||||||
'builtin': False,
|
'builtin': False,
|
||||||
'comment': 'defconf',
|
'comment': 'defconf',
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue