From 89b34bdd7970170491931aba124b21af0a8904cd Mon Sep 17 00:00:00 2001 From: Tim de Boer Date: Mon, 9 Sep 2024 22:57:25 +0200 Subject: [PATCH] Added support for 'routing filter num-list' (#313) * Added support for 'routing filter num-list' * Added support for 'routing filter num-list', changelog * Added support for 'routing filter num-list', changelog --- .../fragments/313-add-routing-filter-num-list.yml | 2 ++ plugins/module_utils/_api_data.py | 13 +++++++++++++ plugins/modules/api_info.py | 1 + plugins/modules/api_modify.py | 1 + 4 files changed, 17 insertions(+) create mode 100644 changelogs/fragments/313-add-routing-filter-num-list.yml diff --git a/changelogs/fragments/313-add-routing-filter-num-list.yml b/changelogs/fragments/313-add-routing-filter-num-list.yml new file mode 100644 index 00000000..5e12ed48 --- /dev/null +++ b/changelogs/fragments/313-add-routing-filter-num-list.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add support for the ``routing filter num-list`` path implemented by RouterOS 7 and newer (https://github.com/ansible-collections/community.routeros/pull/313). diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index a70cb2cf..d6e767bf 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -844,6 +844,19 @@ def join_path(path): )), ], ), + ('routing', 'filter', 'num-list'): APIData( + versioned=[ + ('7', '>=', VersionedAPIData( + fully_understood=True, + fields={ + 'list': KeyInfo(required=True), + 'comment': KeyInfo(can_disable=True, remove_value=''), + 'disabled': KeyInfo(can_disable=True), + 'range': KeyInfo(can_disable=True), + }, + )), + ], + ), ('routing', 'filter', 'rule'): APIData( versioned=[ ('7', '>=', VersionedAPIData( diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index 296059d9..a1d979f2 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -204,6 +204,7 @@ - routing bgp peer - routing bgp template - routing filter + - routing filter num-list - routing filter rule - routing filter select-rule - routing id diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index 3261f5bc..24732a13 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -213,6 +213,7 @@ - routing bgp peer - routing bgp template - routing filter + - routing filter num-list - routing filter rule - routing filter select-rule - routing id