Support for WifiWave2. (#226)

* Support for WifiWave2.

Added configuration profiles to configure Mikrotik APs which
have only WifiWave2 package.

* Addressed review comments

1. Sorted lexicographically new entries
2. Added versioning

* Added few related paths

* Fixed typos

* Lowered min version

* Added wifiwave2 interfaces

* Added upper version limit to WifiWave2

According to the documentation, new RouterOS version uses another
package.

* Addressed review comments
This commit is contained in:
Yuri Timenkov 2023-12-14 07:51:48 +01:00 committed by GitHub
parent 482e5b2b7e
commit c5e51f9a93
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 326 additions and 2 deletions

View file

@ -44,7 +44,7 @@ class APIData(object):
# Mark as 'fully understood' if it is for at least one version
self.fully_understood = False
for dummy, dummy, unversioned in self.versioned:
if unversioned.fully_understood:
if unversioned and not isinstance(unversioned, str) and unversioned.fully_understood:
self.fully_understood = True
break
self._current = None if self.needs_version else self.unversioned
@ -1468,6 +1468,304 @@ PATHS = {
},
),
),
('interface', 'wifiwave2'): APIData(
versioned=[
('7.13', '>=', 'RouterOS 7.13 uses WiFi package'),
('7.8', '>=', VersionedAPIData(
fully_understood=True,
primary_keys=('name', ),
required_one_of=[['default-name', 'master-interface']],
fields={
'aaa': KeyInfo(),
'arp-timeout': KeyInfo(default='auto'),
'arp': KeyInfo(default='enabled'),
'channel': KeyInfo(),
'configuration': KeyInfo(),
'datapath': KeyInfo(),
'default-name': KeyInfo(),
'disable-running-check': KeyInfo(default=False),
'interworking': KeyInfo(),
'l2mtu': KeyInfo(default=1600),
'mac-address': KeyInfo(),
'master-interface': KeyInfo(),
'mtu': KeyInfo(default=1500),
'name': KeyInfo(),
'security': KeyInfo(),
'steering': KeyInfo(),
},
)),
],
),
('interface', 'wifiwave2', 'aaa'): APIData(
versioned=[
('7.13', '>=', 'RouterOS 7.13 uses WiFi package'),
('7.8', '>=', VersionedAPIData(
fully_understood=True,
primary_keys=('name', ),
fields={
'called-format': KeyInfo(can_disable=True),
'calling-format': KeyInfo(can_disable=True),
'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=True),
'interim-update': KeyInfo(can_disable=True),
'mac-caching': KeyInfo(can_disable=True),
'name': KeyInfo(),
'nas-identifier': KeyInfo(can_disable=True),
'password-format': KeyInfo(can_disable=True),
'username-format': KeyInfo(can_disable=True),
},
)),
],
),
('interface', 'wifiwave2', 'access-list'): APIData(
versioned=[
('7.13', '>=', 'RouterOS 7.13 uses WiFi package'),
('7.8', '>=', VersionedAPIData(
fully_understood=True,
fields={
'action': KeyInfo(can_disable=True),
'allow-signal-out-of-range': KeyInfo(can_disable=True),
'client-isolation': KeyInfo(can_disable=True),
'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=True),
'interface': KeyInfo(can_disable=True),
'mac-address': KeyInfo(can_disable=True),
'mac-address-mask': KeyInfo(can_disable=True),
'passphrase': KeyInfo(can_disable=True),
'radius-accounting': KeyInfo(can_disable=True),
'signal-range': KeyInfo(can_disable=True),
'ssid-regexp': KeyInfo(),
'time': KeyInfo(can_disable=True),
'vlan-id': KeyInfo(can_disable=True),
},
)),
],
),
('interface', 'wifiwave2', 'cap'): APIData(
versioned=[
('7.13', '>=', 'RouterOS 7.13 uses WiFi package'),
('7.8', '>=', VersionedAPIData(
single_value=True,
fully_understood=True,
fields={
'caps-man-addresses': KeyInfo(default=''),
'caps-man-certificate-common-names': KeyInfo(default=''),
'caps-man-names': KeyInfo(default=''),
'certificate': KeyInfo(default='none'),
'discovery-interfaces': KeyInfo(default=''),
'enabled': KeyInfo(default=False),
'lock-to-caps-man': KeyInfo(default=False),
'slaves-datapath': KeyInfo(),
'slaves-static': KeyInfo(),
},
)),
],
),
('interface', 'wifiwave2', 'capsman'): APIData(
versioned=[
('7.13', '>=', 'RouterOS 7.13 uses WiFi package'),
('7.8', '>=', VersionedAPIData(
single_value=True,
fully_understood=True,
fields={
'ca-certificate': KeyInfo(default=''),
'certificate': KeyInfo(default='none'),
'enabled': KeyInfo(default=False),
'package-path': KeyInfo(default=''),
'require-peer-certificate': KeyInfo(default=False),
'upgrade-policy': KeyInfo(default='none'),
'interfaces': KeyInfo(default=''),
},
)),
],
),
('interface', 'wifiwave2', 'channel'): APIData(
versioned=[
('7.13', '>=', 'RouterOS 7.13 uses WiFi package'),
('7.8', '>=', VersionedAPIData(
fully_understood=True,
primary_keys=('name', ),
fields={
'band': KeyInfo(),
'frequency': KeyInfo(),
'name': KeyInfo(),
'secondary-frequency': KeyInfo(),
'skip-dfs-channels': KeyInfo(default='disabled'),
'width': KeyInfo(),
},
)),
],
),
('interface', 'wifiwave2', 'configuration'): APIData(
versioned=[
('7.13', '>=', 'RouterOS 7.13 uses WiFi package'),
('7.8', '>=', VersionedAPIData(
fully_understood=True,
primary_keys=('name', ),
fields={
'aaa': KeyInfo(),
'antenna-gain': KeyInfo(),
'beacon-interval': KeyInfo(default=100),
'chains': KeyInfo(),
'channel': KeyInfo(),
'country': KeyInfo(default='United States'),
'datapath': KeyInfo(),
'dtim-period': KeyInfo(default=1),
'hide-ssid': KeyInfo(default=False),
'interworking': KeyInfo(),
'manager': KeyInfo(),
'mode': KeyInfo(default='ap'),
'name': KeyInfo(),
'security': KeyInfo(),
'ssid': KeyInfo(),
'steering': KeyInfo(),
'tx-chains': KeyInfo(),
'tx-power': KeyInfo(),
},
)),
],
),
('interface', 'wifiwave2', 'datapath'): APIData(
versioned=[
('7.13', '>=', 'RouterOS 7.13 uses WiFi package'),
('7.8', '>=', VersionedAPIData(
fully_understood=True,
primary_keys=('name', ),
fields={
'bridge': KeyInfo(),
'bridge-cost': KeyInfo(),
'bridge-horizon': KeyInfo(),
'client-isolation': KeyInfo(default=False),
'interface-list': KeyInfo(),
'name': KeyInfo(),
'openflow-switch': KeyInfo(),
'vlan-id': KeyInfo(),
},
)),
],
),
('interface', 'wifiwave2', 'interworking'): APIData(
versioned=[
('7.13', '>=', 'RouterOS 7.13 uses WiFi package'),
('7.8', '>=', VersionedAPIData(
fully_understood=True,
primary_keys=('name', ),
fields={
'3gpp-info': KeyInfo(),
'authentication-types': KeyInfo(),
'comment': KeyInfo(can_disable=True, remove_value=''),
'connection-capabilities': KeyInfo(),
'disabled': KeyInfo(default=False),
'domain-names': KeyInfo(),
'esr': KeyInfo(),
'hessid': KeyInfo(),
'hotspot20': KeyInfo(),
'hotspot20-dgaf': KeyInfo(),
'internet': KeyInfo(),
'ipv4-availability': KeyInfo(),
'ipv6-availability': KeyInfo(),
'name': KeyInfo(),
'network-type': KeyInfo(),
'operational-classes': KeyInfo(),
'operator-names': KeyInfo(),
'realms': KeyInfo(),
'roaming-ois': KeyInfo(),
'uesa': KeyInfo(),
'venue': KeyInfo(),
'venue-names': KeyInfo(),
'wan-at-capacity': KeyInfo(),
'wan-downlink': KeyInfo(),
'wan-downlink-load': KeyInfo(),
'wan-measurement-duration': KeyInfo(),
'wan-status': KeyInfo(),
'wan-symmetric': KeyInfo(),
'wan-uplink': KeyInfo(),
'wan-uplink-load': KeyInfo(),
},
)),
],
),
('interface', 'wifiwave2', 'provisioning'): APIData(
versioned=[
('7.13', '>=', 'RouterOS 7.13 uses WiFi package'),
('7.8', '>=', VersionedAPIData(
fully_understood=True,
primary_keys=('action', ),
fields={
'action': KeyInfo(default='none'),
'address-ranges': KeyInfo(),
'comment': KeyInfo(can_disable=True, remove_value=''),
'common-name-regexp': KeyInfo(),
'disabled': KeyInfo(default=False),
'identity-regexp': KeyInfo(),
'master-configuration': KeyInfo(),
'name-format': KeyInfo(),
'radio-mac': KeyInfo(),
'slave-configurations': KeyInfo(),
'supported-bands': KeyInfo(),
},
)),
],
),
('interface', 'wifiwave2', 'security'): APIData(
versioned=[
('7.13', '>=', 'RouterOS 7.13 uses WiFi package'),
('7.8', '>=', VersionedAPIData(
fully_understood=True,
primary_keys=('name', ),
fields={
'authentication-types': KeyInfo(),
'connect-group': KeyInfo(can_disable=True),
'connect-priority': KeyInfo(),
'dh-groups': KeyInfo(),
'disable-pmkid': KeyInfo(default=False),
'eap-accounting': KeyInfo(default=False),
'eap-anonymous-identity': KeyInfo(),
'eap-certificate-mode': KeyInfo(default='dont-verify-certificate'),
'eap-methods': KeyInfo(),
'eap-password': KeyInfo(),
'eap-tls-certificate': KeyInfo(),
'eap-username': KeyInfo(),
'encryption': KeyInfo(default='ccmp'),
'ft-mobility-domain': KeyInfo(default=0xADC4),
'ft-nas-identifier': KeyInfo(),
'ft-over-ds': KeyInfo(default=False),
'ft-preserve-vlanid': KeyInfo(default=True),
'ft-r0-key-lifetime': KeyInfo(default='600000s'),
'ft-reassociation-deadline': KeyInfo(default='20s'),
'ft': KeyInfo(default=False),
'group-encryption': KeyInfo(default='ccmp'),
'group-key-update': KeyInfo(default='24h'),
'management-encryption': KeyInfo(default='cmac'),
'management-protection': KeyInfo(),
'name': KeyInfo(),
'owe-transition-interface': KeyInfo(),
'passphrase': KeyInfo(default=''),
'sae-anti-clogging-threshold': KeyInfo(can_disable=True),
'sae-max-failure-rate': KeyInfo(can_disable=True),
'sae-pwe': KeyInfo(default='both'),
'wps': KeyInfo(default='push-button'),
},
)),
],
),
('interface', 'wifiwave2', 'steering'): APIData(
versioned=[
('7.13', '>=', 'RouterOS 7.13 uses WiFi package'),
('7.8', '>=', VersionedAPIData(
fully_understood=True,
primary_keys=('name', ),
fields={
'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=False),
'name': KeyInfo(),
'neighbor-group': KeyInfo(),
'rrm': KeyInfo(),
'wnm': KeyInfo(),
},
)),
],
),
('interface', 'wireguard'): APIData(
unversioned=VersionedAPIData(
fully_understood=True,