From 53bb84ba2a7ba606d4b2ba39baaafd7f831fe8d0 Mon Sep 17 00:00:00 2001 From: derdeagle Date: Sat, 12 Aug 2023 15:57:00 +0200 Subject: [PATCH] Fixes #193: Add caps-man channel and caps-man manager interface (#194) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixes #193: Add caps-man channel and caps-man manager interface Adding the caps-man channel path from scratch. Activating the caps-man manager interface path. * Add changelog fragment and documentation for both paths --------- Co-authored-by: Johannes Münch --- ...channel-and-caps-man_manager_interface.yml | 2 ++ plugins/module_utils/_api_data.py | 26 ++++++++++++++++--- plugins/modules/api_info.py | 2 ++ plugins/modules/api_modify.py | 2 ++ 4 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 changelogs/fragments/194-add-caps-man_channel-and-caps-man_manager_interface.yml diff --git a/changelogs/fragments/194-add-caps-man_channel-and-caps-man_manager_interface.yml b/changelogs/fragments/194-add-caps-man_channel-and-caps-man_manager_interface.yml new file mode 100644 index 0000000..7717f28 --- /dev/null +++ b/changelogs/fragments/194-add-caps-man_channel-and-caps-man_manager_interface.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add path ``caps-man channel`` and enable path ``caps-man manager interface`` (https://github.com/ansible-collections/community.routeros/issues/193, https://github.com/ansible-collections/community.routeros/pull/194). diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index eb26b97..d57ddae 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -797,6 +797,23 @@ PATHS = { 'vlan-mode': KeyInfo(can_disable=True), }, ), + ('caps-man', 'channel'): APIData( + fully_understood=True, + primary_keys=('name', ), + fields={ + 'band': KeyInfo(can_disable=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'control-channel-width': KeyInfo(can_disable=True), + 'extension-channel': KeyInfo(can_disable=True), + 'frequency': KeyInfo(can_disable=True), + 'name': KeyInfo(), + 'reselect-interval': KeyInfo(can_disable=True), + 'save-selected': KeyInfo(can_disable=True), + 'secondary-frequency': KeyInfo(can_disable=True), + 'skip-dfs-channels': KeyInfo(can_disable=True), + 'tx-power': KeyInfo(can_disable=True), + }, + ), ('caps-man', 'configuration'): APIData( fully_understood=True, primary_keys=('name', ), @@ -884,12 +901,13 @@ PATHS = { }, ), ('caps-man', 'manager', 'interface'): APIData( - unknown_mechanism=True, - # primary_keys=('default', ), + fully_understood=True, + primary_keys=('interface', ), fields={ + 'comment': KeyInfo(can_disable=True, remove_value=''), 'default': KeyInfo(), - 'disabled': KeyInfo(), - 'forbid': KeyInfo(), + 'disabled': KeyInfo(default=False), + 'forbid': KeyInfo(default=False), 'interface': KeyInfo(), }, ), diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index 7cb755d..31db39e 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -44,9 +44,11 @@ options: # BEGIN PATH LIST - caps-man aaa - caps-man access-list + - caps-man channel - caps-man configuration - caps-man datapath - caps-man manager + - caps-man manager interface - caps-man provisioning - caps-man security - certificate settings diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index 03bd86f..d5c319b 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -49,9 +49,11 @@ options: # BEGIN PATH LIST - caps-man aaa - caps-man access-list + - caps-man channel - caps-man configuration - caps-man datapath - caps-man manager + - caps-man manager interface - caps-man provisioning - caps-man security - certificate settings