From c81e75cad5cd1e9a44ab5ccdd73c3627b8c9981b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20M=C3=BCnch?= Date: Fri, 24 Jan 2025 08:10:15 +0100 Subject: [PATCH] Fixes #284: Implement 'interface wireless access-list' and 'interface wireless connect-list' Add changelog fragment --- ...rface-wireless-access-and-connect-list.yml | 2 + plugins/module_utils/_api_data.py | 59 +++++++++++++++++++ plugins/modules/api_info.py | 2 + plugins/modules/api_modify.py | 2 + 4 files changed, 65 insertions(+) create mode 100644 changelogs/fragments/340-add-interface-wireless-access-and-connect-list.yml diff --git a/changelogs/fragments/340-add-interface-wireless-access-and-connect-list.yml b/changelogs/fragments/340-add-interface-wireless-access-and-connect-list.yml new file mode 100644 index 00000000..75b6b55c --- /dev/null +++ b/changelogs/fragments/340-add-interface-wireless-access-and-connect-list.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add the ``interface wireless access-list`` and ``interface wireless connect-list`` paths (https://github.com/ansible-collections/community.routeros/issues/284, https://github.com/ansible-collections/community.routeros/pull/340). diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index da85dd3f..f88950c2 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -2545,6 +2545,30 @@ def join_path(path): }, ), ), + ('interface', 'wireless', 'access-list'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + 'allow-signal-out-of-range': KeyInfo(default='10s'), + 'ap-tx-limit': KeyInfo(default=0), + 'authentication': KeyInfo(default=True), + 'client-tx-limit': KeyInfo(default=0), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'forwarding': KeyInfo(default=True), + 'interface': KeyInfo(default='any'), + 'mac-address': KeyInfo(default='00:00:00:00:00:00'), + 'management-protection-key': KeyInfo(default=''), + 'private-algo': KeyInfo(default='none'), + 'private-key': KeyInfo(default=''), + 'private-pre-shared-key': KeyInfo(default=''), + 'signal-range': KeyInfo(default='-120..120'), + 'time': KeyInfo(), + 'vlan-id': KeyInfo(default=1), + 'vlan-mode': KeyInfo(default='default'), + }, + ), + ), ('interface', 'wireless', 'cap'): APIData( unversioned=VersionedAPIData( single_value=True, @@ -2563,6 +2587,41 @@ def join_path(path): }, ), ), + ('interface', 'wireless', 'connect-list'): APIData( + unversioned=VersionedAPIData( + fully_understood=True, + fields={ + '3gpp': KeyInfo(default=''), + 'allow-signal-out-of-range': KeyInfo(default='10s'), + 'area-prefix': KeyInfo(default=''), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'connect': KeyInfo(default=True), + 'disabled': KeyInfo(default=False), + 'interface': KeyInfo(required=True), + 'interworking': KeyInfo(default='any'), + 'iw-asra': KeyInfo(default='any'), + 'iw-authentication-types': KeyInfo(), + 'iw-connection-capabilities': KeyInfo(), + 'iw-esr': KeyInfo(default='any'), + 'iw-hessid': KeyInfo(default='00:00:00:00:00:00'), + 'iw-hotspot20': KeyInfo(default='any'), + 'iw-hotspot20-dgaf': KeyInfo(default='any'), + 'iw-internet': KeyInfo(default='any'), + 'iw-ipv4-availability': KeyInfo(default='any'), + 'iw-ipv6-availability': KeyInfo(default='any'), + 'iw-network-type': KeyInfo(default='wildcard'), + 'iw-realms': KeyInfo(), + 'iw-roaming-ois': KeyInfo(default=''), + 'iw-uesa': KeyInfo(default='any'), + 'iw-venue': KeyInfo(default='any'), + 'mac-address': KeyInfo(default='00:00:00:00:00:00'), + 'security-profile': KeyInfo(default='none'), + 'signal-range': KeyInfo(default='-120..120'), + 'ssid': KeyInfo(default=''), + 'wireless-protocol': KeyInfo(default='any'), + }, + ), + ), ('interface', 'wireless', 'security-profiles'): APIData( unversioned=VersionedAPIData( fully_understood=True, diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index e68ded02..b4af74c0 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -109,8 +109,10 @@ - interface wireguard - interface wireguard peers - interface wireless + - interface wireless access-list - interface wireless align - interface wireless cap + - interface wireless connect-list - interface wireless security-profiles - interface wireless sniffer - interface wireless snooper diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index b4a77652..f0ac26dd 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -120,8 +120,10 @@ - interface wireguard - interface wireguard peers - interface wireless + - interface wireless access-list - interface wireless align - interface wireless cap + - interface wireless connect-list - interface wireless security-profiles - interface wireless sniffer - interface wireless snooper