From 479f3106bf91fe77f3025e070a1b768cd12d9228 Mon Sep 17 00:00:00 2001 From: hansmi Date: Sat, 11 Nov 2023 23:10:10 +0100 Subject: [PATCH] Make wireless parameter "running" read-only (#233) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit e4a21311 added API data for the "interface wireless" path. It contained the read-only "running" parameter. Writing to the parameter fails: Error while modifying for name="…" (ID *3): unknown parameter running Signed-off-by: Michael Hanselmann --- changelogs/fragments/233-wireless-running-read-only.yml | 2 ++ plugins/module_utils/_api_data.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/233-wireless-running-read-only.yml diff --git a/changelogs/fragments/233-wireless-running-read-only.yml b/changelogs/fragments/233-wireless-running-read-only.yml new file mode 100644 index 0000000..a69aa58 --- /dev/null +++ b/changelogs/fragments/233-wireless-running-read-only.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - mark the ``interface wireless`` parameter ``running`` as read-only (https://github.com/ansible-collections/community.routeros/pull/233). diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index e876ac8..9f5afc2 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -1563,7 +1563,7 @@ PATHS = { 'radio-name': KeyInfo(), 'rate-selection': KeyInfo(default='advanced'), 'rate-set': KeyInfo(default='default'), - 'running': KeyInfo(default=False), + 'running': KeyInfo(default=False, read_only=True), 'rx-chains': KeyInfo(default='0,1'), 'scan-list': KeyInfo(default='default'), 'secondary-frequency': KeyInfo(default=''),