Skip to content

Commit

Permalink
Add support for "ipv6 firewall nat" (#204)
Browse files Browse the repository at this point in the history
RouterOS supports NAT for IPv6 under the `ipv6 firewall nat` path.

Signed-off-by: Michael Hanselmann <[email protected]>
  • Loading branch information
hansmi authored Aug 26, 2023
1 parent adff9bb commit b7569b9
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelogs/fragments/204-add-ipv6-firewall-nat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
minor_changes:
- api_info, api_modify - add support for the ``ipv6 firewall nat`` path (https://github.com/ansible-collections/community.routeros/pull/204).
60 changes: 60 additions & 0 deletions plugins/module_utils/_api_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -2228,6 +2228,66 @@ def join_path(path):
'tls-host': KeyInfo(can_disable=True),
}
),
('ipv6', 'firewall', 'nat'): APIData(
fully_understood=True,
stratify_keys=('chain', ),
fields={
'action': KeyInfo(),
'address-list': KeyInfo(),
'address-list-timeout': KeyInfo(),
'chain': KeyInfo(),
'comment': KeyInfo(can_disable=True, remove_value=''),
'connection-bytes': KeyInfo(can_disable=True),
'connection-limit': KeyInfo(can_disable=True),
'connection-mark': KeyInfo(can_disable=True),
'connection-rate': KeyInfo(can_disable=True),
'connection-state': KeyInfo(can_disable=True),
'connection-type': KeyInfo(can_disable=True),
'content': KeyInfo(can_disable=True),
'disabled': KeyInfo(),
'dscp': KeyInfo(can_disable=True),
'dst-address': KeyInfo(can_disable=True),
'dst-address-list': KeyInfo(can_disable=True),
'dst-address-type': KeyInfo(can_disable=True),
'dst-limit': KeyInfo(can_disable=True),
'dst-port': KeyInfo(can_disable=True),
'icmp-options': KeyInfo(can_disable=True),
'in-bridge-port': KeyInfo(can_disable=True),
'in-bridge-port-list': KeyInfo(can_disable=True),
'in-interface': KeyInfo(can_disable=True),
'in-interface-list': KeyInfo(can_disable=True),
'ingress-priority': KeyInfo(can_disable=True),
'ipsec-policy': KeyInfo(can_disable=True),
'jump-target': KeyInfo(),
'layer7-protocol': KeyInfo(can_disable=True),
'limit': KeyInfo(can_disable=True),
'log': KeyInfo(),
'log-prefix': KeyInfo(),
'out-bridge-port': KeyInfo(can_disable=True),
'out-bridge-port-list': KeyInfo(can_disable=True),
'out-interface': KeyInfo(can_disable=True),
'out-interface-list': KeyInfo(can_disable=True),
'packet-mark': KeyInfo(can_disable=True),
'packet-size': KeyInfo(can_disable=True),
'per-connection-classifier': KeyInfo(can_disable=True),
'port': KeyInfo(can_disable=True),
'priority': KeyInfo(can_disable=True),
'protocol': KeyInfo(can_disable=True),
'random': KeyInfo(can_disable=True),
'routing-mark': KeyInfo(can_disable=True),
'src-address': KeyInfo(can_disable=True),
'src-address-list': KeyInfo(can_disable=True),
'src-address-type': KeyInfo(can_disable=True),
'src-mac-address': KeyInfo(can_disable=True),
'src-port': KeyInfo(can_disable=True),
'tcp-flags': KeyInfo(can_disable=True),
'tcp-mss': KeyInfo(can_disable=True),
'time': KeyInfo(can_disable=True),
'tls-host': KeyInfo(can_disable=True),
'to-addresses': KeyInfo(can_disable=True),
'to-ports': KeyInfo(can_disable=True),
},
),
('ipv6', 'firewall', 'raw'): APIData(
fully_understood=True,
stratify_keys=('chain',),
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/api_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
- ipv6 firewall address-list
- ipv6 firewall filter
- ipv6 firewall mangle
- ipv6 firewall nat
- ipv6 firewall raw
- ipv6 nd
- ipv6 nd prefix default
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/api_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
- ipv6 firewall address-list
- ipv6 firewall filter
- ipv6 firewall mangle
- ipv6 firewall nat
- ipv6 firewall raw
- ipv6 nd
- ipv6 nd prefix default
Expand Down

0 comments on commit b7569b9

Please sign in to comment.