Add "interface wireless" to API data (#195)

The default values match those of RouterOS 7.11 on a Mikrotik
RB924i-2nD-BT5&BG77 ("Knot"). They're cross-checked with upstream
documentation[1].

[1] https://help.mikrotik.com/docs/display/ROS/Wireless+Interface

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
This commit is contained in:
hansmi 2023-08-20 14:15:38 +02:00 committed by GitHub
parent 2e1159b4c4
commit e4a21311a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 102 additions and 0 deletions

View file

@ -0,0 +1,2 @@
minor_changes:
- api_info, api_modify - add support for the ``interface wireless`` path (https://github.com/ansible-collections/community.routeros/pull/195).

View file

@ -1171,6 +1171,104 @@ PATHS = {
'public-key': KeyInfo(), 'public-key': KeyInfo(),
}, },
), ),
('interface', 'wireless'): APIData(
fully_understood=True,
primary_keys=('name', ),
required_one_of=[['default-name', 'master-interface']],
fields={
'adaptive-noise-immunity': KeyInfo(default='none'),
'allow-sharedkey': KeyInfo(default=False),
'ampdu-priorities': KeyInfo(default=0),
'amsdu-limit': KeyInfo(default=8192),
'amsdu-threshold': KeyInfo(default=8192),
'antenna-gain': KeyInfo(default=0),
'antenna-mode': KeyInfo(),
'area': KeyInfo(default=''),
'arp': KeyInfo(default='enabled'),
'arp-timeout': KeyInfo(default='auto'),
'band': KeyInfo(),
'basic-rates-a/g': KeyInfo(default='6Mbps'),
'basic-rates-b': KeyInfo(default='1Mbps'),
'bridge-mode': KeyInfo(default='enabled'),
'channel-width': KeyInfo(default='20mhz'),
'comment': KeyInfo(can_disable=True, remove_value=''),
'compression': KeyInfo(default=False),
'country': KeyInfo(default='etsi'),
'default-ap-tx-limit': KeyInfo(default=0),
'default-authentication': KeyInfo(default=True),
'default-client-tx-limit': KeyInfo(default=0),
'default-forwarding': KeyInfo(default=True),
'default-name': KeyInfo(),
'disable-running-check': KeyInfo(default=False),
'disabled': KeyInfo(default=True),
'disconnect-timeout': KeyInfo(default='3s'),
'distance': KeyInfo(default='dynamic'),
'frame-lifetime': KeyInfo(default=0),
'frequency': KeyInfo(),
'frequency-mode': KeyInfo(default='regulatory-domain'),
'frequency-offset': KeyInfo(default=0),
'guard-interval': KeyInfo(default='any'),
'hide-ssid': KeyInfo(default=False),
'ht-basic-mcs': KeyInfo(),
'ht-supported-mcs': KeyInfo(),
'hw-fragmentation-threshold': KeyInfo(default='disabled'),
'hw-protection-mode': KeyInfo(default='none'),
'hw-protection-threshold': KeyInfo(default=0),
'hw-retries': KeyInfo(default=7),
'installation': KeyInfo(default='any'),
'interworking-profile': KeyInfo(default='disabled'),
'keepalive-frames': KeyInfo(default='enabled'),
'l2mtu': KeyInfo(default=1600),
'mac-address': KeyInfo(),
'master-interface': KeyInfo(),
'max-station-count': KeyInfo(default=2007),
'mode': KeyInfo(default='ap-bridge'),
'mtu': KeyInfo(default=1500),
'multicast-buffering': KeyInfo(default='enabled'),
'multicast-helper': KeyInfo(default='default'),
'name': KeyInfo(),
'noise-floor-threshold': KeyInfo(default='default'),
'nv2-cell-radius': KeyInfo(default=30),
'nv2-downlink-ratio': KeyInfo(default=50),
'nv2-mode': KeyInfo(default='dynamic-downlink'),
'nv2-noise-floor-offset': KeyInfo(default='default'),
'nv2-preshared-key': KeyInfo(default=''),
'nv2-qos': KeyInfo(default='default'),
'nv2-queue-count': KeyInfo(default=2),
'nv2-security': KeyInfo(default='disabled'),
'nv2-sync-secret': KeyInfo(default=''),
'on-fail-retry-time': KeyInfo(default='100ms'),
'preamble-mode': KeyInfo(default='both'),
'radio-name': KeyInfo(),
'rate-selection': KeyInfo(default='advanced'),
'rate-set': KeyInfo(default='default'),
'running': KeyInfo(default=False),
'rx-chains': KeyInfo(default='0,1'),
'scan-list': KeyInfo(default='default'),
'secondary-frequency': KeyInfo(default=''),
'security-profile': KeyInfo(default='default'),
'skip-dfs-channels': KeyInfo(default='disabled'),
'ssid': KeyInfo(required=True),
'station-bridge-clone-mac': KeyInfo(),
'station-roaming': KeyInfo(default='disabled'),
'supported-rates-a/g': KeyInfo(),
'supported-rates-b': KeyInfo(),
'tdma-period-size': KeyInfo(default=2),
'tx-chains': KeyInfo(),
'tx-power-mode': KeyInfo(default='default'),
'update-stats-interval': KeyInfo(default='disabled'),
'vlan-id': KeyInfo(default=1),
'vlan-mode': KeyInfo(default='no-tag'),
'wds-cost-range': KeyInfo(default='50-150'),
'wds-default-bridge': KeyInfo(default='none'),
'wds-default-cost': KeyInfo(default=100),
'wds-ignore-ssid': KeyInfo(default=False),
'wds-mode': KeyInfo(default='disabled'),
'wireless-protocol': KeyInfo(default='any'),
'wmm-support': KeyInfo(default='disabled'),
'wps-mode': KeyInfo(default='push-button'),
},
),
('interface', 'wireless', 'align'): APIData( ('interface', 'wireless', 'align'): APIData(
single_value=True, single_value=True,
fully_understood=True, fully_understood=True,

View file

@ -79,6 +79,7 @@ options:
- interface vrrp - interface vrrp
- interface wireguard - interface wireguard
- interface wireguard peers - interface wireguard peers
- interface wireless
- interface wireless align - interface wireless align
- interface wireless cap - interface wireless cap
- interface wireless sniffer - interface wireless sniffer

View file

@ -84,6 +84,7 @@ options:
- interface vrrp - interface vrrp
- interface wireguard - interface wireguard
- interface wireguard peers - interface wireguard peers
- interface wireless
- interface wireless align - interface wireless align
- interface wireless cap - interface wireless cap
- interface wireless sniffer - interface wireless sniffer