mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-07-20 10:57:23 +02:00
Update _api_data.py (#324)
* Update _api_data.py * Create 324-fix-firewall-log-and-log-prefix.yaml * Update changelogs/fragments/324-fix-firewall-log-and-log-prefix.yaml Co-authored-by: Felix Fontein <felix@fontein.de> * Update test_api_info.py * fix tests --------- Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: alsmirnov <alsmirnov@ourgapps.com>
This commit is contained in:
parent
14d89a3cfa
commit
249b1a92e2
3 changed files with 24 additions and 8 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- api_info, api_modify - fields ``log`` and ``log-prefix`` in paths ``ip firewall filter``, ``ip firewall mangle``, ``ip firewall nat``, ``ip firewall raw`` now have the correct default values (https://github.com/ansible-collections/community.routeros/pull/324).
|
|
@ -2986,8 +2986,8 @@ PATHS = {
|
||||||
'jump-target': KeyInfo(can_disable=True),
|
'jump-target': KeyInfo(can_disable=True),
|
||||||
'layer7-protocol': KeyInfo(can_disable=True),
|
'layer7-protocol': KeyInfo(can_disable=True),
|
||||||
'limit': KeyInfo(can_disable=True),
|
'limit': KeyInfo(can_disable=True),
|
||||||
'log': KeyInfo(can_disable=True),
|
'log': KeyInfo(default=False),
|
||||||
'log-prefix': KeyInfo(can_disable=True),
|
'log-prefix': KeyInfo(default=''),
|
||||||
'nth': KeyInfo(can_disable=True),
|
'nth': KeyInfo(can_disable=True),
|
||||||
'out-bridge-port': KeyInfo(can_disable=True),
|
'out-bridge-port': KeyInfo(can_disable=True),
|
||||||
'out-bridge-port-list': KeyInfo(can_disable=True),
|
'out-bridge-port-list': KeyInfo(can_disable=True),
|
||||||
|
@ -3057,8 +3057,8 @@ PATHS = {
|
||||||
'jump-target': KeyInfo(can_disable=True),
|
'jump-target': KeyInfo(can_disable=True),
|
||||||
'layer7-protocol': KeyInfo(can_disable=True),
|
'layer7-protocol': KeyInfo(can_disable=True),
|
||||||
'limit': KeyInfo(can_disable=True),
|
'limit': KeyInfo(can_disable=True),
|
||||||
'log': KeyInfo(can_disable=True),
|
'log': KeyInfo(default=False),
|
||||||
'log-prefix': KeyInfo(can_disable=True),
|
'log-prefix': KeyInfo(default=''),
|
||||||
'new-connection-mark': KeyInfo(can_disable=True),
|
'new-connection-mark': KeyInfo(can_disable=True),
|
||||||
'new-dscp': KeyInfo(can_disable=True),
|
'new-dscp': KeyInfo(can_disable=True),
|
||||||
'new-mss': KeyInfo(can_disable=True),
|
'new-mss': KeyInfo(can_disable=True),
|
||||||
|
@ -3137,8 +3137,8 @@ PATHS = {
|
||||||
'jump-target': KeyInfo(can_disable=True),
|
'jump-target': KeyInfo(can_disable=True),
|
||||||
'layer7-protocol': KeyInfo(can_disable=True),
|
'layer7-protocol': KeyInfo(can_disable=True),
|
||||||
'limit': KeyInfo(can_disable=True),
|
'limit': KeyInfo(can_disable=True),
|
||||||
'log': KeyInfo(can_disable=True),
|
'log': KeyInfo(default=False),
|
||||||
'log-prefix': KeyInfo(can_disable=True),
|
'log-prefix': KeyInfo(default=''),
|
||||||
'nth': KeyInfo(can_disable=True),
|
'nth': KeyInfo(can_disable=True),
|
||||||
'out-bridge-port': KeyInfo(can_disable=True),
|
'out-bridge-port': KeyInfo(can_disable=True),
|
||||||
'out-bridge-port-list': KeyInfo(can_disable=True),
|
'out-bridge-port-list': KeyInfo(can_disable=True),
|
||||||
|
@ -3200,8 +3200,8 @@ PATHS = {
|
||||||
'ipv4-options': KeyInfo(can_disable=True),
|
'ipv4-options': KeyInfo(can_disable=True),
|
||||||
'jump-target': KeyInfo(can_disable=True),
|
'jump-target': KeyInfo(can_disable=True),
|
||||||
'limit': KeyInfo(can_disable=True),
|
'limit': KeyInfo(can_disable=True),
|
||||||
'log': KeyInfo(can_disable=True),
|
'log': KeyInfo(default=False),
|
||||||
'log-prefix': KeyInfo(can_disable=True),
|
'log-prefix': KeyInfo(default=''),
|
||||||
'nth': KeyInfo(can_disable=True),
|
'nth': KeyInfo(can_disable=True),
|
||||||
'out-bridge-port': KeyInfo(can_disable=True),
|
'out-bridge-port': KeyInfo(can_disable=True),
|
||||||
'out-bridge-port-list': KeyInfo(can_disable=True),
|
'out-bridge-port-list': KeyInfo(can_disable=True),
|
||||||
|
|
|
@ -620,6 +620,8 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase):
|
||||||
'comment': 'defconf',
|
'comment': 'defconf',
|
||||||
'protocol': 'icmp',
|
'protocol': 'icmp',
|
||||||
'disabled': False,
|
'disabled': False,
|
||||||
|
'log': False,
|
||||||
|
'log-prefix': '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'.id': '*3',
|
'.id': '*3',
|
||||||
|
@ -627,6 +629,8 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase):
|
||||||
'chain': 'input',
|
'chain': 'input',
|
||||||
'comment': 'defconf',
|
'comment': 'defconf',
|
||||||
'disabled': False,
|
'disabled': False,
|
||||||
|
'log': False,
|
||||||
|
'log-prefix': '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'.id': '*4',
|
'.id': '*4',
|
||||||
|
@ -634,6 +638,8 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase):
|
||||||
'chain': 'input',
|
'chain': 'input',
|
||||||
'comment': 'defconf',
|
'comment': 'defconf',
|
||||||
'disabled': False,
|
'disabled': False,
|
||||||
|
'log': False,
|
||||||
|
'log-prefix': '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'.id': '*7',
|
'.id': '*7',
|
||||||
|
@ -642,6 +648,8 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase):
|
||||||
'comment': 'defconf',
|
'comment': 'defconf',
|
||||||
'disabled': False,
|
'disabled': False,
|
||||||
'in-interface': 'wan',
|
'in-interface': 'wan',
|
||||||
|
'log': False,
|
||||||
|
'log-prefix': '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'.id': '*8',
|
'.id': '*8',
|
||||||
|
@ -650,6 +658,8 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase):
|
||||||
'comment': 'defconf',
|
'comment': 'defconf',
|
||||||
'connection-state': 'established',
|
'connection-state': 'established',
|
||||||
'disabled': False,
|
'disabled': False,
|
||||||
|
'log': False,
|
||||||
|
'log-prefix': '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'.id': '*9',
|
'.id': '*9',
|
||||||
|
@ -658,6 +668,8 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase):
|
||||||
'comment': 'defconf',
|
'comment': 'defconf',
|
||||||
'connection-state': 'related',
|
'connection-state': 'related',
|
||||||
'disabled': False,
|
'disabled': False,
|
||||||
|
'log': False,
|
||||||
|
'log-prefix': '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'.id': '*A',
|
'.id': '*A',
|
||||||
|
@ -666,6 +678,8 @@ class TestRouterosApiFindAndModifyModule(ModuleTestCase):
|
||||||
'comment': 'defconf',
|
'comment': 'defconf',
|
||||||
'connection-status': 'invalid',
|
'connection-status': 'invalid',
|
||||||
'disabled': False,
|
'disabled': False,
|
||||||
|
'log': False,
|
||||||
|
'log-prefix': '',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
self.assertEqual(result['match_count'], 3)
|
self.assertEqual(result['match_count'], 3)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue