From f627c844190f029b499ae3aa5178dd9d9a235788 Mon Sep 17 00:00:00 2001 From: Sam Burney Date: Sat, 10 Feb 2024 10:05:12 +1030 Subject: [PATCH 1/5] Add '/queue simple' path --- plugins/module_utils/_api_data.py | 24 ++++++++++++++++++++++++ plugins/modules/api_info.py | 1 + plugins/modules/api_modify.py | 1 + 3 files changed, 26 insertions(+) diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index a421cffe..dd0a8e08 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -4239,6 +4239,30 @@ def join_path(path): }, ), ), + ('queue', 'simple'): APIData( + unversioned=VersionedAPIData( + primary_keys=('name', ), + fully_understood=True, + fields={ + 'bucket-size': KeyInfo(default='0.1'), + 'burst-limit': KeyInfo(default=0), + 'burst-threshold': KeyInfo(default=0), + 'burst-time': KeyInfo(default='0s'), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(default=False), + 'limit-at': KeyInfo(default=0), + 'max-limit': KeyInfo(default=0), + 'name': KeyInfo(), + 'packet-marks': KeyInfo(default=''), + 'parent': KeyInfo(default='none'), + 'priority': KeyInfo(default=8), + 'queue': KeyInfo(default='default-small'), + 'target': KeyInfo(required=True), + 'dst': KeyInfo(can_disable=True, remove_value=''), + 'time': KeyInfo(can_disable=True, remove_value=''), + }, + ), + ), ('queue', 'tree'): APIData( unversioned=VersionedAPIData( primary_keys=('name', ), diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index f9a39464..29c977bf 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -180,6 +180,7 @@ - ppp aaa - ppp profile - queue interface + - queue simple - queue tree - radius - radius incoming diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index d7175007..16c1f2fe 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -189,6 +189,7 @@ - ppp aaa - ppp profile - queue interface + - queue simple - queue tree - radius - radius incoming From d78ed379f2ff63704a2df3da284fe73fa107fb13 Mon Sep 17 00:00:00 2001 From: Sam Burney Date: Sat, 10 Feb 2024 10:13:35 +1030 Subject: [PATCH 2/5] Add changelogs/fragments/260-add-queue_simple-path.yml --- changelogs/fragments/260-add-queue_simple-path.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/260-add-queue_simple-path.yml diff --git a/changelogs/fragments/260-add-queue_simple-path.yml b/changelogs/fragments/260-add-queue_simple-path.yml new file mode 100644 index 00000000..73d8e928 --- /dev/null +++ b/changelogs/fragments/260-add-queue_simple-path.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add missing path ``/queue simple`` (https://github.com/ansible-collections/community.routeros/pull/260). \ No newline at end of file From e8578a50891e99e9643d0a16727b7fcfdaa61d05 Mon Sep 17 00:00:00 2001 From: Sam Burney Date: Sat, 30 Mar 2024 20:49:20 +1030 Subject: [PATCH 3/5] Updated queue-simple path: - Updated all default values to match those from the API - Re-ordered fields to match API output - Target is not required; added default value --- plugins/module_utils/_api_data.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index dd0a8e08..5e044512 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -4244,22 +4244,22 @@ def join_path(path): primary_keys=('name', ), fully_understood=True, fields={ - 'bucket-size': KeyInfo(default='0.1'), - 'burst-limit': KeyInfo(default=0), - 'burst-threshold': KeyInfo(default=0), - 'burst-time': KeyInfo(default='0s'), 'comment': KeyInfo(can_disable=True, remove_value=''), + 'dst': KeyInfo(can_disable=True, remove_value=''), + 'time': KeyInfo(can_disable=True, remove_value=''), + 'bucket-size': KeyInfo(default='0.1/0.1'), + 'burst-limit': KeyInfo(default='0/0'), + 'burst-threshold': KeyInfo(default='0/0'), + 'burst-time': KeyInfo(default='0s/0s'), 'disabled': KeyInfo(default=False), - 'limit-at': KeyInfo(default=0), - 'max-limit': KeyInfo(default=0), + 'limit-at': KeyInfo(default='0/0'), + 'max-limit': KeyInfo(default='0/0'), 'name': KeyInfo(), 'packet-marks': KeyInfo(default=''), 'parent': KeyInfo(default='none'), - 'priority': KeyInfo(default=8), - 'queue': KeyInfo(default='default-small'), - 'target': KeyInfo(required=True), - 'dst': KeyInfo(can_disable=True, remove_value=''), - 'time': KeyInfo(can_disable=True, remove_value=''), + 'priority': KeyInfo(default='8/8'), + 'queue': KeyInfo(default='default-small/default-small'), + 'target': KeyInfo(default=''), }, ), ), From 655196b14bab2b9e1a5cfa9cd78f4a7f832b513f Mon Sep 17 00:00:00 2001 From: Sam Burney Date: Sat, 30 Mar 2024 21:33:35 +1030 Subject: [PATCH 4/5] 'target' *is* required, however it interracts strangely with values of 0.0.0.0/0 and '' (Empty string). --- plugins/module_utils/_api_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index 5e044512..0b06cc54 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -4259,7 +4259,7 @@ def join_path(path): 'parent': KeyInfo(default='none'), 'priority': KeyInfo(default='8/8'), 'queue': KeyInfo(default='default-small/default-small'), - 'target': KeyInfo(default=''), + 'target': KeyInfo(required=True), }, ), ), From 84abf5ccab25aa23571e7c5a5554f2f44fe56050 Mon Sep 17 00:00:00 2001 From: Sam Burney Date: Sat, 30 Mar 2024 22:40:20 +1030 Subject: [PATCH 5/5] Updated PR in document fragment --- ...-add-queue_simple-path.yml => 269-add-queue_simple-path.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename changelogs/fragments/{260-add-queue_simple-path.yml => 269-add-queue_simple-path.yml} (97%) diff --git a/changelogs/fragments/260-add-queue_simple-path.yml b/changelogs/fragments/269-add-queue_simple-path.yml similarity index 97% rename from changelogs/fragments/260-add-queue_simple-path.yml rename to changelogs/fragments/269-add-queue_simple-path.yml index 73d8e928..f943de52 100644 --- a/changelogs/fragments/260-add-queue_simple-path.yml +++ b/changelogs/fragments/269-add-queue_simple-path.yml @@ -1,2 +1,2 @@ minor_changes: - - api_info, api_modify - add missing path ``/queue simple`` (https://github.com/ansible-collections/community.routeros/pull/260). \ No newline at end of file + - api_info, api_modify - add missing path ``/queue simple`` (https://github.com/ansible-collections/community.routeros/pull/269). \ No newline at end of file