mirror of
https://github.com/ansible-collections/community.routeros.git
synced 2025-06-21 17:39:04 +02:00
support for new API paths and few updates (#133)
* support for new API paths and few updates Signed-off-by: Tomas Herfert <herfik> * changelog fix Signed-off-by: Tomas Herfert <herfik> * tests update Signed-off-by: Tomas Herfert <herfik> Signed-off-by: Tomas Herfert <herfik> Co-authored-by: Tomas Herfert <herfik>
This commit is contained in:
parent
23b3aa3beb
commit
5af14a8940
5 changed files with 247 additions and 16 deletions
|
@ -80,6 +80,33 @@ def join_path(path):
|
|||
# 3. All bold attributes go into the `primary_keys` list -- this is not always true!
|
||||
|
||||
PATHS = {
|
||||
('interface', 'bonding'): APIData(
|
||||
fully_understood=True,
|
||||
primary_keys=('name', ),
|
||||
fields={
|
||||
'arp': KeyInfo(default='enabled'),
|
||||
'arp-interval': KeyInfo(default='100ms'),
|
||||
'arp-ip-targets': KeyInfo(default=''),
|
||||
'arp-timeout': KeyInfo(default='auto'),
|
||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'down-delay': KeyInfo(default='0ms'),
|
||||
'forced-mac-address': KeyInfo(can_disable=True),
|
||||
'lacp-rate': KeyInfo(default='30secs'),
|
||||
'lacp-user-key': KeyInfo(can_disable=True, remove_value=0),
|
||||
'link-monitoring': KeyInfo(default='mii'),
|
||||
'mii-interval': KeyInfo(default='100ms'),
|
||||
'min-links': KeyInfo(default=0),
|
||||
'mlag-id': KeyInfo(can_disable=True, remove_value=0),
|
||||
'mode': KeyInfo(default='balance-rr'),
|
||||
'mtu': KeyInfo(default=1500),
|
||||
'name': KeyInfo(),
|
||||
'primary': KeyInfo(default='none'),
|
||||
'slaves': KeyInfo(required=True),
|
||||
'transmit-hash-policy': KeyInfo(default='layer-2'),
|
||||
'up-delay': KeyInfo(default='0ms'),
|
||||
}
|
||||
),
|
||||
('interface', 'bridge'): APIData(
|
||||
fully_understood=True,
|
||||
primary_keys=('name', ),
|
||||
|
@ -852,6 +879,14 @@ PATHS = {
|
|||
'unknown-unicast-flood': KeyInfo(default=True),
|
||||
},
|
||||
),
|
||||
('interface', 'bridge', 'mlag'): APIData(
|
||||
single_value=True,
|
||||
fully_understood=True,
|
||||
fields={
|
||||
'bridge': KeyInfo(default='none'),
|
||||
'peer-port': KeyInfo(default='none'),
|
||||
}
|
||||
),
|
||||
('interface', 'bridge', 'port-controller'): APIData(
|
||||
single_value=True,
|
||||
fully_understood=True,
|
||||
|
@ -1247,6 +1282,7 @@ PATHS = {
|
|||
primary_keys=('address', 'list', ),
|
||||
fields={
|
||||
'address': KeyInfo(),
|
||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'list': KeyInfo(),
|
||||
},
|
||||
|
@ -1284,6 +1320,7 @@ PATHS = {
|
|||
'ingress-priority': KeyInfo(can_disable=True),
|
||||
'ipsec-policy': KeyInfo(can_disable=True),
|
||||
'ipv4-options': KeyInfo(can_disable=True),
|
||||
'jump-target': KeyInfo(),
|
||||
'layer7-protocol': KeyInfo(can_disable=True),
|
||||
'limit': KeyInfo(can_disable=True),
|
||||
'log': KeyInfo(),
|
||||
|
@ -1302,6 +1339,7 @@ PATHS = {
|
|||
'protocol': KeyInfo(can_disable=True),
|
||||
'psd': KeyInfo(can_disable=True),
|
||||
'random': KeyInfo(can_disable=True),
|
||||
'reject-with': KeyInfo(),
|
||||
'routing-mark': KeyInfo(can_disable=True),
|
||||
'routing-table': KeyInfo(can_disable=True),
|
||||
'src-address': KeyInfo(can_disable=True),
|
||||
|
@ -1348,6 +1386,7 @@ PATHS = {
|
|||
'ingress-priority': KeyInfo(can_disable=True),
|
||||
'ipsec-policy': KeyInfo(can_disable=True),
|
||||
'ipv4-options': KeyInfo(can_disable=True),
|
||||
'jump-target': KeyInfo(),
|
||||
'layer7-protocol': KeyInfo(can_disable=True),
|
||||
'limit': KeyInfo(can_disable=True),
|
||||
'log': KeyInfo(),
|
||||
|
@ -1397,17 +1436,65 @@ PATHS = {
|
|||
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-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),
|
||||
'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(),
|
||||
'layer7-protocol': KeyInfo(can_disable=True),
|
||||
'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),
|
||||
'realm': KeyInfo(can_disable=True),
|
||||
'routing-mark': KeyInfo(can_disable=True),
|
||||
'same-not-by-dst': KeyInfo(),
|
||||
'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-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),
|
||||
'ttl': KeyInfo(can_disable=True),
|
||||
},
|
||||
),
|
||||
('ip', 'hotspot', 'user'): APIData(
|
||||
|
@ -1633,8 +1720,8 @@ PATHS = {
|
|||
primary_keys=('address', 'list', ),
|
||||
fields={
|
||||
'address': KeyInfo(),
|
||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'dynamic': KeyInfo(default=False),
|
||||
'list': KeyInfo(),
|
||||
},
|
||||
),
|
||||
|
@ -1668,6 +1755,7 @@ PATHS = {
|
|||
'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(),
|
||||
|
@ -1683,6 +1771,7 @@ PATHS = {
|
|||
'priority': KeyInfo(can_disable=True),
|
||||
'protocol': KeyInfo(can_disable=True),
|
||||
'random': KeyInfo(can_disable=True),
|
||||
'reject-with': KeyInfo(),
|
||||
'src-address': KeyInfo(can_disable=True),
|
||||
'src-address-list': KeyInfo(can_disable=True),
|
||||
'src-address-type': KeyInfo(can_disable=True),
|
||||
|
@ -1693,24 +1782,97 @@ PATHS = {
|
|||
'time': KeyInfo(can_disable=True),
|
||||
},
|
||||
),
|
||||
('ipv6', 'nd'): APIData(
|
||||
unknown_mechanism=True,
|
||||
# primary_keys=('default', ),
|
||||
('ipv6', 'firewall', 'mangle'): APIData(
|
||||
fully_understood=True,
|
||||
stratify_keys=('chain', ),
|
||||
fields={
|
||||
'default': KeyInfo(),
|
||||
'advertise-dns': KeyInfo(),
|
||||
'advertise-mac-address': KeyInfo(),
|
||||
'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(),
|
||||
'hop-limit': 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),
|
||||
'dst-prefix': KeyInfo(),
|
||||
'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(),
|
||||
'new-connection-mark': KeyInfo(),
|
||||
'new-dscp': KeyInfo(),
|
||||
'new-hop-limit': KeyInfo(),
|
||||
'new-mss': KeyInfo(),
|
||||
'new-packet-mark': KeyInfo(),
|
||||
'new-routing-mark': 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),
|
||||
'passthrough': KeyInfo(),
|
||||
'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),
|
||||
'sniff-id': KeyInfo(),
|
||||
'sniff-target': KeyInfo(),
|
||||
'sniff-target-port': KeyInfo(),
|
||||
'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),
|
||||
'src-prefix': KeyInfo(),
|
||||
'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(
|
||||
fully_understood=True,
|
||||
primary_keys=('interface', ),
|
||||
fields={
|
||||
'advertise-dns': KeyInfo(default=True),
|
||||
'advertise-mac-address': KeyInfo(default=True),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'dns': KeyInfo(default=''),
|
||||
'hop-limit': KeyInfo(default='unspecified'),
|
||||
'interface': KeyInfo(),
|
||||
'managed-address-configuration': KeyInfo(),
|
||||
'mtu': KeyInfo(),
|
||||
'other-configuration': KeyInfo(),
|
||||
'ra-delay': KeyInfo(),
|
||||
'ra-interval': KeyInfo(),
|
||||
'ra-lifetime': KeyInfo(),
|
||||
'reachable-time': KeyInfo(),
|
||||
'retransmit-interval': KeyInfo(),
|
||||
'managed-address-configuration': KeyInfo(default=False),
|
||||
'mtu': KeyInfo(default='unspecified'),
|
||||
'other-configuration': KeyInfo(default=False),
|
||||
'ra-delay': KeyInfo(default='3s'),
|
||||
'ra-interval': KeyInfo(default='3m20s-10m'),
|
||||
'ra-lifetime': KeyInfo(default='30m'),
|
||||
'ra-preference': KeyInfo(default='medium'),
|
||||
'reachable-time': KeyInfo(default='unspecified'),
|
||||
'retransmit-interval': KeyInfo(default='unspecified'),
|
||||
},
|
||||
),
|
||||
('ipv6', 'nd', 'prefix', 'default'): APIData(
|
||||
|
@ -2003,6 +2165,20 @@ PATHS = {
|
|||
'user': KeyInfo(default=''),
|
||||
},
|
||||
),
|
||||
('system', 'ups'): APIData(
|
||||
fully_understood=True,
|
||||
primary_keys=('name', ),
|
||||
fields={
|
||||
'alarm-setting': KeyInfo(default='immediate'),
|
||||
'check-capabilities': KeyInfo(can_disable=True, remove_value=True),
|
||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||
'disabled': KeyInfo(default=True),
|
||||
'min-runtime': KeyInfo(default='never'),
|
||||
'name': KeyInfo(),
|
||||
'offline-time': KeyInfo(default='0s'),
|
||||
'port': KeyInfo(required=True),
|
||||
},
|
||||
),
|
||||
('system', 'watchdog'): APIData(
|
||||
single_value=True,
|
||||
fully_understood=True,
|
||||
|
@ -2404,4 +2580,30 @@ PATHS = {
|
|||
'cpu': KeyInfo(),
|
||||
},
|
||||
),
|
||||
('system', 'scheduler'): APIData(
|
||||
fully_understood=True,
|
||||
primary_keys=('name', ),
|
||||
fields={
|
||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||
'disabled': KeyInfo(default=False),
|
||||
'interval': KeyInfo(default='0s'),
|
||||
'name': KeyInfo(),
|
||||
'on-event': KeyInfo(default=''),
|
||||
'policy': KeyInfo(default='ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon'),
|
||||
'start-date': KeyInfo(),
|
||||
'start-time': KeyInfo(),
|
||||
},
|
||||
),
|
||||
('system', 'script'): APIData(
|
||||
fully_understood=True,
|
||||
primary_keys=('name',),
|
||||
fields={
|
||||
'comment': KeyInfo(can_disable=True, remove_value=''),
|
||||
'dont-require-permissions': KeyInfo(default=False),
|
||||
'name': KeyInfo(),
|
||||
'owner': KeyInfo(),
|
||||
'policy': KeyInfo(default='ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon'),
|
||||
'source': KeyInfo(default=''),
|
||||
},
|
||||
),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue