API update (#144)

* API update

Signed-off-by: Tomas Herfert <herfik>

* fix changelog fragment directory

Signed-off-by: Tomas Herfert <herfik>

Signed-off-by: Tomas Herfert <herfik>
Co-authored-by: Tomas Herfert <herfik>
This commit is contained in:
Tomas Herfert 2023-01-01 22:18:24 +01:00 committed by GitHub
parent d2caf56215
commit f38b01d7bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 134 additions and 4 deletions

View file

@ -0,0 +1,4 @@
minor_changes:
- api_modify, api_info - support API paths ``ip arp``, ``ip firewall raw``, ``ipv6 firewall raw`` (https://github.com/ansible-collections/community.routeros/pull/144).
bugfixes:
- api_modify, api_info - defaults corrected for fields in ``interface wireguard peers`` API path (https://github.com/ansible-collections/community.routeros/pull/144).

View file

@ -1184,14 +1184,14 @@ PATHS = {
fully_understood=True, fully_understood=True,
primary_keys=('public-key', 'interface'), primary_keys=('public-key', 'interface'),
fields={ fields={
'allowed-address': KeyInfo(), 'allowed-address': KeyInfo(required=True),
'comment': KeyInfo(can_disable=True, remove_value=''), 'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=False), 'disabled': KeyInfo(default=False),
'endpoint-address': KeyInfo(), 'endpoint-address': KeyInfo(default=''),
'endpoint-port': KeyInfo(default=0), 'endpoint-port': KeyInfo(default=0),
'interface': KeyInfo(), 'interface': KeyInfo(),
'persistent-keepalive': KeyInfo(), 'persistent-keepalive': KeyInfo(can_disable=True, remove_value=0),
'preshared-key': KeyInfo(), 'preshared-key': KeyInfo(can_disable=True, remove_value=''),
'public-key': KeyInfo(), 'public-key': KeyInfo(),
}, },
), ),
@ -1279,6 +1279,17 @@ PATHS = {
'network': KeyInfo(automatically_computed_from=('address', )), 'network': KeyInfo(automatically_computed_from=('address', )),
}, },
), ),
('ip', 'arp'): APIData(
fully_understood=True,
fields={
'address': KeyInfo(default='0.0.0.0'),
'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=False),
'interface': KeyInfo(required=True),
'mac-address': KeyInfo(default='00:00:00:00:00:00'),
'published': KeyInfo(default=False),
},
),
('ip', 'cloud'): APIData( ('ip', 'cloud'): APIData(
single_value=True, single_value=True,
fully_understood=True, fully_understood=True,
@ -1616,6 +1627,62 @@ PATHS = {
'ttl': KeyInfo(can_disable=True), 'ttl': KeyInfo(can_disable=True),
}, },
), ),
('ip', 'firewall', 'raw'): 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=''),
'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),
'fragment': KeyInfo(can_disable=True),
'hotspot': 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),
'ipv4-options': KeyInfo(can_disable=True),
'jump-target': KeyInfo(),
'limit': KeyInfo(can_disable=True),
'log': KeyInfo(),
'log-prefix': KeyInfo(),
'nth': KeyInfo(can_disable=True),
'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),
'psd': KeyInfo(can_disable=True),
'random': 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),
'ttl': KeyInfo(can_disable=True),
},
),
('ip', 'hotspot', 'user'): APIData( ('ip', 'hotspot', 'user'): APIData(
unknown_mechanism=True, unknown_mechanism=True,
# primary_keys=('default', ), # primary_keys=('default', ),
@ -1973,6 +2040,59 @@ PATHS = {
'tls-host': KeyInfo(can_disable=True), 'tls-host': KeyInfo(can_disable=True),
} }
), ),
('ipv6', 'firewall', 'raw'): 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=''),
'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),
'headers': KeyInfo(can_disable=True),
'hop-limit': 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(),
'limit': KeyInfo(can_disable=True),
'log': KeyInfo(),
'log-prefix': KeyInfo(),
'nth': KeyInfo(can_disable=True),
'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),
'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),
}
),
('ipv6', 'nd'): APIData( ('ipv6', 'nd'): APIData(
fully_understood=True, fully_understood=True,
primary_keys=('interface', ), primary_keys=('interface', ),

View file

@ -84,6 +84,7 @@ options:
- ip accounting - ip accounting
- ip accounting web-access - ip accounting web-access
- ip address - ip address
- ip arp
- ip cloud - ip cloud
- ip cloud advanced - ip cloud advanced
- ip dhcp-client - ip dhcp-client
@ -99,6 +100,7 @@ options:
- ip firewall filter - ip firewall filter
- ip firewall mangle - ip firewall mangle
- ip firewall nat - ip firewall nat
- ip firewall raw
- ip firewall service-port - ip firewall service-port
- ip hotspot service-port - ip hotspot service-port
- ip ipsec identity - ip ipsec identity
@ -128,6 +130,7 @@ options:
- ipv6 firewall address-list - ipv6 firewall address-list
- ipv6 firewall filter - ipv6 firewall filter
- ipv6 firewall mangle - ipv6 firewall mangle
- ipv6 firewall raw
- ipv6 nd - ipv6 nd
- ipv6 nd prefix default - ipv6 nd prefix default
- ipv6 route - ipv6 route

View file

@ -89,6 +89,7 @@ options:
- ip accounting - ip accounting
- ip accounting web-access - ip accounting web-access
- ip address - ip address
- ip arp
- ip cloud - ip cloud
- ip cloud advanced - ip cloud advanced
- ip dhcp-client - ip dhcp-client
@ -104,6 +105,7 @@ options:
- ip firewall filter - ip firewall filter
- ip firewall mangle - ip firewall mangle
- ip firewall nat - ip firewall nat
- ip firewall raw
- ip firewall service-port - ip firewall service-port
- ip hotspot service-port - ip hotspot service-port
- ip ipsec identity - ip ipsec identity
@ -133,6 +135,7 @@ options:
- ipv6 firewall address-list - ipv6 firewall address-list
- ipv6 firewall filter - ipv6 firewall filter
- ipv6 firewall mangle - ipv6 firewall mangle
- ipv6 firewall raw
- ipv6 nd - ipv6 nd
- ipv6 nd prefix default - ipv6 nd prefix default
- ipv6 route - ipv6 route