From 8213278bf4cd53a9cc09faf9e2ef48def72066a3 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann Date: Thu, 14 Sep 2023 01:00:18 +0200 Subject: [PATCH] Finalize fields for "ppp profile" A few defaults were missing for `ppp profile`. Mark the path as fully understood to enable its use in Ansible tasks. Signed-off-by: Michael Hanselmann --- changelogs/fragments/217-ppp-profiles.yml | 2 ++ plugins/module_utils/_api_data.py | 27 ++++++++++++----------- plugins/modules/api_info.py | 1 + plugins/modules/api_modify.py | 1 + 4 files changed, 18 insertions(+), 13 deletions(-) create mode 100644 changelogs/fragments/217-ppp-profiles.yml diff --git a/changelogs/fragments/217-ppp-profiles.yml b/changelogs/fragments/217-ppp-profiles.yml new file mode 100644 index 00000000..4412e2c9 --- /dev/null +++ b/changelogs/fragments/217-ppp-profiles.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - finalize fields for the ``ppp profile`` path and enable it (https://github.com/ansible-collections/community.routeros/pull/217). diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index 6a154f57..d78d3350 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -3326,36 +3326,37 @@ def join_path(path): ), ('ppp', 'profile'): APIData( unversioned=VersionedAPIData( - has_identifier=True, + fully_understood=True, + primary_keys=('name', ), fields={ - 'address-list': KeyInfo(), + 'address-list': KeyInfo(default=''), 'bridge': KeyInfo(can_disable=True), 'bridge-horizon': KeyInfo(can_disable=True), - 'bridge-learning': KeyInfo(), + 'bridge-learning': KeyInfo(default='default'), 'bridge-path-cost': KeyInfo(can_disable=True), 'bridge-port-priority': KeyInfo(can_disable=True), - 'change-tcp-mss': KeyInfo(), + 'change-tcp-mss': KeyInfo(default=True), 'dns-server': KeyInfo(can_disable=True), 'idle-timeout': KeyInfo(can_disable=True), 'incoming-filter': KeyInfo(can_disable=True), 'insert-queue-before': KeyInfo(can_disable=True), 'interface-list': KeyInfo(can_disable=True), 'local-address': KeyInfo(can_disable=True), - 'name': KeyInfo(), - 'on-down': KeyInfo(), - 'on-up': KeyInfo(), - 'only-one': KeyInfo(), + 'name': KeyInfo(required=True), + 'on-down': KeyInfo(default=''), + 'on-up': KeyInfo(default=''), + 'only-one': KeyInfo(default='default'), 'outgoing-filter': KeyInfo(can_disable=True), 'parent-queue': KeyInfo(can_disable=True), 'queue-type': KeyInfo(can_disable=True), 'rate-limit': KeyInfo(can_disable=True), 'remote-address': KeyInfo(can_disable=True), 'session-timeout': KeyInfo(can_disable=True), - 'use-compression': KeyInfo(), - 'use-encryption': KeyInfo(), - 'use-ipv6': KeyInfo(), - 'use-mpls': KeyInfo(), - 'use-upnp': KeyInfo(), + 'use-compression': KeyInfo(default='default'), + 'use-encryption': KeyInfo(default='default'), + 'use-ipv6': KeyInfo(default=True), + 'use-mpls': KeyInfo(default='default'), + 'use-upnp': KeyInfo(default='default'), 'wins-server': KeyInfo(can_disable=True), }, ), diff --git a/plugins/modules/api_info.py b/plugins/modules/api_info.py index c616ff45..ce506518 100644 --- a/plugins/modules/api_info.py +++ b/plugins/modules/api_info.py @@ -148,6 +148,7 @@ - mpls ldp - port firmware - ppp aaa + - ppp profile - queue interface - queue tree - radius incoming diff --git a/plugins/modules/api_modify.py b/plugins/modules/api_modify.py index 447be9ac..b0d03274 100644 --- a/plugins/modules/api_modify.py +++ b/plugins/modules/api_modify.py @@ -153,6 +153,7 @@ - mpls ldp - port firmware - ppp aaa + - ppp profile - queue interface - queue tree - radius incoming