From 78d2fdd0f29c6f7e0c309090ae60f6cf437c5009 Mon Sep 17 00:00:00 2001 From: samburney Date: Thu, 18 Apr 2024 07:00:14 +0930 Subject: [PATCH] Add support for '/queue type' path (#274) * Add support for '/queue type' path * Add changelogs/fragments/274-add_queue_type_path.yml --- .../fragments/274-add_queue_type_path.yml | 2 + plugins/module_utils/_api_data.py | 87 ++++++++++++------- plugins/modules/api_info.py | 1 + plugins/modules/api_modify.py | 1 + 4 files changed, 62 insertions(+), 29 deletions(-) create mode 100644 changelogs/fragments/274-add_queue_type_path.yml diff --git a/changelogs/fragments/274-add_queue_type_path.yml b/changelogs/fragments/274-add_queue_type_path.yml new file mode 100644 index 00000000..8406b3f8 --- /dev/null +++ b/changelogs/fragments/274-add_queue_type_path.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add missing path ``/queue type`` (https://github.com/ansible-collections/community.routeros/pull/274). \ No newline at end of file diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index 892eca23..4718a63b 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -4326,6 +4326,64 @@ def join_path(path): }, ), ), + ('queue', 'type'): APIData( + unversioned=VersionedAPIData( + primary_keys=('name', ), + fully_understood=True, + fields={ + 'name': KeyInfo(), + 'kind': KeyInfo(required=True), + 'bfifo-limit': KeyInfo(default=15000), + 'cake-ack-filter': KeyInfo(default='none'), + 'cake-atm': KeyInfo(default='none'), + 'cake-autorate-ingress': KeyInfo(can_disable=True), + 'cake-bandwidth': KeyInfo(can_disable=True, remove_value=0), + 'cake-diffserv': KeyInfo(default='diffserv3'), + 'cake-flowmode': KeyInfo(default='triple-isolate'), + 'cake-memlimit': KeyInfo(default=0), + 'cake-mpu': KeyInfo(can_disable=True, remove_value=''), + 'cake-nat': KeyInfo(can_disable=True, remove_value=False), + 'cake-overhead': KeyInfo(default=0), + 'cake-overhead-scheme': KeyInfo(can_disable=True, remove_value=''), + 'cake-rtt': KeyInfo(default='100ms'), + 'cake-rtt-scheme': KeyInfo(default='none'), + 'cake-wash': KeyInfo(can_disable=True, remove_value=False), + 'codel-ce-threshold': KeyInfo(can_disable=True, remove_value=''), + 'codel-ecn': KeyInfo(can_disable=True, remove_value=False), + 'codel-interval': KeyInfo(default='100ms'), + 'codel-limit': KeyInfo(default=1000), + 'codel-target': KeyInfo(default='5ms'), + 'fq-codel-ce-threshold': KeyInfo(can_disable=True, remove_value=''), + 'fq-codel-ecn': KeyInfo(default=True), + 'fq-codel-flows': KeyInfo(default=1024), + 'fq-codel-interval': KeyInfo(default='100ms'), + 'fq-codel-limit': KeyInfo(default=10240), + 'fq-codel-memlimit': KeyInfo(default=33554432), + 'fq-codel-quantum': KeyInfo(default=1514), + 'fq-codel-target': KeyInfo(default='5ms'), + 'mq-pfifo-limit': KeyInfo(default=50), + 'pcq-burst-rate': KeyInfo(default=0), + 'pcq-burst-threshold': KeyInfo(default=0), + 'pcq-burst-time': KeyInfo(default='10s'), + 'pcq-classifier': KeyInfo(can_disable=True, remove_value=''), + 'pcq-dst-address-mask': KeyInfo(default=32), + 'pcq-dst-address6-mask': KeyInfo(default=128), + 'pcq-limit': KeyInfo(default=50), + 'pcq-rate': KeyInfo(default=0), + 'pcq-src-address-mask': KeyInfo(default=32), + 'pcq-src-address6-mask': KeyInfo(default=128), + 'pcq-total-limit': KeyInfo(default=2000), + 'pfifo-limit': KeyInfo(default=50), + 'red-avg-packet': KeyInfo(default=1000), + 'red-burst': KeyInfo(default=20), + 'red-limit': KeyInfo(default=60), + 'red-max-threshold': KeyInfo(default=50), + 'red-min-threshold': KeyInfo(default=10), + 'sfq-allot': KeyInfo(default=1514), + 'sfq-perturb': KeyInfo(default=5), + }, + ), + ), ('interface', 'ethernet', 'switch'): APIData( unversioned=VersionedAPIData( fixed_entries=True, @@ -4401,35 +4459,6 @@ def join_path(path): }, ), ), - ('queue', 'type'): APIData( - unversioned=VersionedAPIData( - has_identifier=True, - fields={ - 'kind': KeyInfo(), - 'mq-pfifo-limit': KeyInfo(), - 'name': KeyInfo(), - 'pcq-burst-rate': KeyInfo(), - 'pcq-burst-threshold': KeyInfo(), - 'pcq-burst-time': KeyInfo(), - 'pcq-classifier': KeyInfo(), - 'pcq-dst-address-mask': KeyInfo(), - 'pcq-dst-address6-mask': KeyInfo(), - 'pcq-limit': KeyInfo(), - 'pcq-rate': KeyInfo(), - 'pcq-src-address-mask': KeyInfo(), - 'pcq-src-address6-mask': KeyInfo(), - 'pcq-total-limit': KeyInfo(), - 'pfifo-limit': KeyInfo(), - 'red-avg-packet': KeyInfo(), - 'red-burst': KeyInfo(), - 'red-limit': KeyInfo(), - 'red-max-threshold': KeyInfo(), - 'red-min-threshold': KeyInfo(), - 'sfq-allot': KeyInfo(), - 'sfq-perturb': KeyInfo(), - }, - ), - ), ('routing', 'bgp', 'connection'): APIData( unversioned=VersionedAPIData( fully_understood=True, diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index fb6a08f7..bbb0bd1e 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -183,6 +183,7 @@ - queue interface - queue simple - queue tree + - queue type - radius - radius incoming - routing bgp connection diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index 8f40a7ca..87a1184c 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -192,6 +192,7 @@ - queue interface - queue simple - queue tree + - queue type - radius - radius incoming - routing bgp connection