mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-06-21 09:35:45 +02:00
Fixes #236: Add missing parameters for the "ip firewall" subpaths and set the default value for the "disabled" parameter for most paths (#237)
* Fixes #236: Add missing parameters The parameters "address-list", "address-list-timeout", and "realm" were missing for some subpaths of "ip firewall" and are now added. Additionally the default value of "False" for the "disabled" parameter has been set so that an e.g. firewall rule, which was disabled (disabled=True) is enabled (disabled=False) after removing the "disabled" argument in the data. Some more parameters can now be removed, e.g. "jump-target", "log", and "log-prefix", which are not mandatory. * Add missing changes for #236 Additionally fixed the PR id in the changelog fragment. * Update changelogs/fragments/237-add-missing-ip-firewall-attributes.yml Full stop added at the end of the changelog fragment Co-authored-by: Felix Fontein <felix@fontein.de> * Update changelogs/fragments/237-add-missing-ip-firewall-attributes.yml Full stop added at the end of the changelog fragment Co-authored-by: Felix Fontein <felix@fontein.de> * Fix unit tests --------- Co-authored-by: Johannes Münch <git@washiza.eu> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
7de154e907
commit
ad6faf275d
4 changed files with 59 additions and 34 deletions
|
@ -959,7 +959,7 @@ PATHS = {
|
|||
fields={
|
||||
'name': KeyInfo(required=True),
|
||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||
'disabled': KeyInfo(can_disable=True),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'fib': KeyInfo(),
|
||||
},
|
||||
)),
|
||||
|
@ -1007,7 +1007,7 @@ PATHS = {
|
|||
'client-to-client-forwarding': KeyInfo(can_disable=True),
|
||||
'client-tx-limit': KeyInfo(can_disable=True),
|
||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||
'disabled': KeyInfo(),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'interface': KeyInfo(can_disable=True),
|
||||
'mac-address': KeyInfo(can_disable=True),
|
||||
'mac-address-mask': KeyInfo(can_disable=True),
|
||||
|
@ -1941,6 +1941,8 @@ PATHS = {
|
|||
stratify_keys=('chain', ),
|
||||
fields={
|
||||
'action': KeyInfo(),
|
||||
'address-list': KeyInfo(can_disable=True),
|
||||
'address-list-timeout': KeyInfo(can_disable=True),
|
||||
'chain': KeyInfo(),
|
||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||
'connection-bytes': KeyInfo(can_disable=True),
|
||||
|
@ -1951,7 +1953,7 @@ PATHS = {
|
|||
'connection-state': KeyInfo(can_disable=True),
|
||||
'connection-type': KeyInfo(can_disable=True),
|
||||
'content': KeyInfo(can_disable=True),
|
||||
'disabled': KeyInfo(),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'dscp': KeyInfo(can_disable=True),
|
||||
'dst-address': KeyInfo(can_disable=True),
|
||||
'dst-address-list': KeyInfo(can_disable=True),
|
||||
|
@ -1969,11 +1971,11 @@ PATHS = {
|
|||
'ingress-priority': KeyInfo(can_disable=True),
|
||||
'ipsec-policy': KeyInfo(can_disable=True),
|
||||
'ipv4-options': KeyInfo(can_disable=True),
|
||||
'jump-target': KeyInfo(),
|
||||
'jump-target': KeyInfo(can_disable=True),
|
||||
'layer7-protocol': KeyInfo(can_disable=True),
|
||||
'limit': KeyInfo(can_disable=True),
|
||||
'log': KeyInfo(),
|
||||
'log-prefix': KeyInfo(),
|
||||
'log': KeyInfo(can_disable=True),
|
||||
'log-prefix': KeyInfo(can_disable=True),
|
||||
'nth': KeyInfo(can_disable=True),
|
||||
'out-bridge-port': KeyInfo(can_disable=True),
|
||||
'out-bridge-port-list': KeyInfo(can_disable=True),
|
||||
|
@ -1988,7 +1990,8 @@ PATHS = {
|
|||
'protocol': KeyInfo(can_disable=True),
|
||||
'psd': KeyInfo(can_disable=True),
|
||||
'random': KeyInfo(can_disable=True),
|
||||
'reject-with': KeyInfo(),
|
||||
'realm': KeyInfo(can_disable=True),
|
||||
'reject-with': KeyInfo(can_disable=True),
|
||||
'routing-mark': KeyInfo(can_disable=True),
|
||||
'routing-table': KeyInfo(can_disable=True),
|
||||
'src-address': KeyInfo(can_disable=True),
|
||||
|
@ -2010,6 +2013,8 @@ PATHS = {
|
|||
stratify_keys=('chain', ),
|
||||
fields={
|
||||
'action': KeyInfo(),
|
||||
'address-list': KeyInfo(can_disable=True),
|
||||
'address-list-timeout': KeyInfo(can_disable=True),
|
||||
'chain': KeyInfo(),
|
||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||
'connection-bytes': KeyInfo(can_disable=True),
|
||||
|
@ -2020,7 +2025,7 @@ PATHS = {
|
|||
'connection-state': KeyInfo(can_disable=True),
|
||||
'connection-type': KeyInfo(can_disable=True),
|
||||
'content': KeyInfo(can_disable=True),
|
||||
'disabled': KeyInfo(),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'dscp': KeyInfo(can_disable=True),
|
||||
'dst-address': KeyInfo(can_disable=True),
|
||||
'dst-address-list': KeyInfo(can_disable=True),
|
||||
|
@ -2037,11 +2042,11 @@ PATHS = {
|
|||
'ingress-priority': KeyInfo(can_disable=True),
|
||||
'ipsec-policy': KeyInfo(can_disable=True),
|
||||
'ipv4-options': KeyInfo(can_disable=True),
|
||||
'jump-target': KeyInfo(),
|
||||
'jump-target': KeyInfo(can_disable=True),
|
||||
'layer7-protocol': KeyInfo(can_disable=True),
|
||||
'limit': KeyInfo(can_disable=True),
|
||||
'log': KeyInfo(),
|
||||
'log-prefix': KeyInfo(),
|
||||
'log': KeyInfo(can_disable=True),
|
||||
'log-prefix': KeyInfo(can_disable=True),
|
||||
'new-connection-mark': KeyInfo(can_disable=True),
|
||||
'new-dscp': KeyInfo(can_disable=True),
|
||||
'new-mss': KeyInfo(can_disable=True),
|
||||
|
@ -2064,6 +2069,7 @@ PATHS = {
|
|||
'protocol': KeyInfo(can_disable=True),
|
||||
'psd': KeyInfo(can_disable=True),
|
||||
'random': KeyInfo(can_disable=True),
|
||||
'realm': KeyInfo(can_disable=True),
|
||||
'route-dst': KeyInfo(can_disable=True),
|
||||
'routing-mark': KeyInfo(can_disable=True),
|
||||
'routing-table': KeyInfo(can_disable=True),
|
||||
|
@ -2089,8 +2095,8 @@ PATHS = {
|
|||
stratify_keys=('chain', ),
|
||||
fields={
|
||||
'action': KeyInfo(),
|
||||
'address-list': KeyInfo(),
|
||||
'address-list-timeout': KeyInfo(),
|
||||
'address-list': KeyInfo(can_disable=True),
|
||||
'address-list-timeout': KeyInfo(can_disable=True),
|
||||
'chain': KeyInfo(),
|
||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||
'connection-bytes': KeyInfo(can_disable=True),
|
||||
|
@ -2099,7 +2105,7 @@ PATHS = {
|
|||
'connection-rate': KeyInfo(can_disable=True),
|
||||
'connection-type': KeyInfo(can_disable=True),
|
||||
'content': KeyInfo(can_disable=True),
|
||||
'disabled': KeyInfo(),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'dscp': KeyInfo(can_disable=True),
|
||||
'dst-address': KeyInfo(can_disable=True),
|
||||
'dst-address-list': KeyInfo(can_disable=True),
|
||||
|
@ -2116,11 +2122,11 @@ PATHS = {
|
|||
'ingress-priority': KeyInfo(can_disable=True),
|
||||
'ipsec-policy': KeyInfo(can_disable=True),
|
||||
'ipv4-options': KeyInfo(can_disable=True),
|
||||
'jump-target': KeyInfo(),
|
||||
'jump-target': KeyInfo(can_disable=True),
|
||||
'layer7-protocol': KeyInfo(can_disable=True),
|
||||
'limit': KeyInfo(can_disable=True),
|
||||
'log': KeyInfo(),
|
||||
'log-prefix': KeyInfo(),
|
||||
'log': KeyInfo(can_disable=True),
|
||||
'log-prefix': KeyInfo(can_disable=True),
|
||||
'nth': KeyInfo(can_disable=True),
|
||||
'out-bridge-port': KeyInfo(can_disable=True),
|
||||
'out-bridge-port-list': KeyInfo(can_disable=True),
|
||||
|
@ -2134,9 +2140,10 @@ PATHS = {
|
|||
'protocol': KeyInfo(can_disable=True),
|
||||
'psd': KeyInfo(can_disable=True),
|
||||
'random': KeyInfo(can_disable=True),
|
||||
'randomise-ports': KeyInfo(can_disable=True),
|
||||
'realm': KeyInfo(can_disable=True),
|
||||
'routing-mark': KeyInfo(can_disable=True),
|
||||
'same-not-by-dst': KeyInfo(),
|
||||
'same-not-by-dst': KeyInfo(can_disable=True),
|
||||
'src-address': KeyInfo(can_disable=True),
|
||||
'src-address-list': KeyInfo(can_disable=True),
|
||||
'src-address-type': KeyInfo(can_disable=True),
|
||||
|
@ -2157,12 +2164,12 @@ PATHS = {
|
|||
stratify_keys=('chain',),
|
||||
fields={
|
||||
'action': KeyInfo(),
|
||||
'address-list': KeyInfo(),
|
||||
'address-list-timeout': KeyInfo(),
|
||||
'address-list': KeyInfo(can_disable=True),
|
||||
'address-list-timeout': KeyInfo(can_disable=True),
|
||||
'chain': KeyInfo(),
|
||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||
'content': KeyInfo(can_disable=True),
|
||||
'disabled': KeyInfo(),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'dscp': KeyInfo(can_disable=True),
|
||||
'dst-address': KeyInfo(can_disable=True),
|
||||
'dst-address-list': KeyInfo(can_disable=True),
|
||||
|
@ -2179,10 +2186,10 @@ PATHS = {
|
|||
'ingress-priority': KeyInfo(can_disable=True),
|
||||
'ipsec-policy': KeyInfo(can_disable=True),
|
||||
'ipv4-options': KeyInfo(can_disable=True),
|
||||
'jump-target': KeyInfo(),
|
||||
'jump-target': KeyInfo(can_disable=True),
|
||||
'limit': KeyInfo(can_disable=True),
|
||||
'log': KeyInfo(),
|
||||
'log-prefix': KeyInfo(),
|
||||
'log': KeyInfo(can_disable=True),
|
||||
'log-prefix': KeyInfo(can_disable=True),
|
||||
'nth': KeyInfo(can_disable=True),
|
||||
'out-bridge-port': KeyInfo(can_disable=True),
|
||||
'out-bridge-port-list': KeyInfo(can_disable=True),
|
||||
|
@ -2503,6 +2510,8 @@ PATHS = {
|
|||
stratify_keys=('chain', ),
|
||||
fields={
|
||||
'action': KeyInfo(),
|
||||
'address-list': KeyInfo(can_disable=True),
|
||||
'address-list-timeout': KeyInfo(can_disable=True),
|
||||
'chain': KeyInfo(),
|
||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||
'connection-bytes': KeyInfo(can_disable=True),
|
||||
|
@ -2512,7 +2521,7 @@ PATHS = {
|
|||
'connection-state': KeyInfo(can_disable=True),
|
||||
'connection-type': KeyInfo(can_disable=True),
|
||||
'content': KeyInfo(can_disable=True),
|
||||
'disabled': KeyInfo(),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'dscp': KeyInfo(can_disable=True),
|
||||
'dst-address': KeyInfo(can_disable=True),
|
||||
'dst-address-list': KeyInfo(can_disable=True),
|
||||
|
@ -2528,10 +2537,10 @@ PATHS = {
|
|||
'in-interface-list': KeyInfo(can_disable=True),
|
||||
'ingress-priority': KeyInfo(can_disable=True),
|
||||
'ipsec-policy': KeyInfo(can_disable=True),
|
||||
'jump-target': KeyInfo(),
|
||||
'jump-target': KeyInfo(can_disable=True),
|
||||
'limit': KeyInfo(can_disable=True),
|
||||
'log': KeyInfo(),
|
||||
'log-prefix': KeyInfo(),
|
||||
'log': KeyInfo(can_disable=False),
|
||||
'log-prefix': KeyInfo(can_disable=False),
|
||||
'nth': KeyInfo(can_disable=True),
|
||||
'out-bridge-port': KeyInfo(can_disable=True),
|
||||
'out-bridge-port-list': KeyInfo(can_disable=True),
|
||||
|
@ -2573,7 +2582,7 @@ PATHS = {
|
|||
'connection-state': KeyInfo(can_disable=True),
|
||||
'connection-type': KeyInfo(can_disable=True),
|
||||
'content': KeyInfo(can_disable=True),
|
||||
'disabled': KeyInfo(),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'dscp': KeyInfo(can_disable=True),
|
||||
'dst-address': KeyInfo(can_disable=True),
|
||||
'dst-address-list': KeyInfo(can_disable=True),
|
||||
|
@ -2647,7 +2656,7 @@ PATHS = {
|
|||
'connection-state': KeyInfo(can_disable=True),
|
||||
'connection-type': KeyInfo(can_disable=True),
|
||||
'content': KeyInfo(can_disable=True),
|
||||
'disabled': KeyInfo(),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'dscp': KeyInfo(can_disable=True),
|
||||
'dst-address': KeyInfo(can_disable=True),
|
||||
'dst-address-list': KeyInfo(can_disable=True),
|
||||
|
@ -2703,7 +2712,7 @@ PATHS = {
|
|||
'chain': KeyInfo(),
|
||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||
'content': KeyInfo(can_disable=True),
|
||||
'disabled': KeyInfo(),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'dscp': KeyInfo(can_disable=True),
|
||||
'dst-address': KeyInfo(can_disable=True),
|
||||
'dst-address-list': KeyInfo(can_disable=True),
|
||||
|
@ -2796,7 +2805,7 @@ PATHS = {
|
|||
'blackhole': KeyInfo(can_disable=True),
|
||||
'check-gateway': KeyInfo(can_disable=True),
|
||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||
'disabled': KeyInfo(),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'distance': KeyInfo(default=1),
|
||||
'dst-address': KeyInfo(),
|
||||
'gateway': KeyInfo(),
|
||||
|
@ -3581,7 +3590,7 @@ PATHS = {
|
|||
'cluster-id': KeyInfo(),
|
||||
'comment': KeyInfo(),
|
||||
'connect': KeyInfo(default=True),
|
||||
'disabled': KeyInfo(),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'hold-time': KeyInfo(),
|
||||
'input.accept-communities': KeyInfo(),
|
||||
'input.accept-ext-communities': KeyInfo(),
|
||||
|
@ -3640,7 +3649,7 @@ PATHS = {
|
|||
'client-to-client-reflection': KeyInfo(),
|
||||
'cluster-id': KeyInfo(can_disable=True),
|
||||
'confederation': KeyInfo(can_disable=True),
|
||||
'disabled': KeyInfo(),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'ignore-as-path-len': KeyInfo(),
|
||||
'name': KeyInfo(),
|
||||
'out-filter': KeyInfo(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue