From 575af30d88d52cacb3b10b110e97803e20206da9 Mon Sep 17 00:00:00 2001 From: Peter Petrovich Date: Sun, 26 Jan 2025 12:34:43 +0100 Subject: [PATCH] DHCPv6 client: add new options from 7.15+ (#341) * script * custom-duid * use-interface-duid * validate-server-duid --- .../341-add-dhcpv6-client-use-interface-duid.yml | 2 ++ plugins/module_utils/_api_data.py | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 changelogs/fragments/341-add-dhcpv6-client-use-interface-duid.yml diff --git a/changelogs/fragments/341-add-dhcpv6-client-use-interface-duid.yml b/changelogs/fragments/341-add-dhcpv6-client-use-interface-duid.yml new file mode 100644 index 00000000..f034497b --- /dev/null +++ b/changelogs/fragments/341-add-dhcpv6-client-use-interface-duid.yml @@ -0,0 +1,2 @@ +minor_changes: + - api_info, api_modify - add the ``use-interface-duid`` option for ``ipv6 dhcp-client`` path. This option prevents issues with Fritzbox modems and routers, when using virtual interfaces (like VLANs) may create duplicated records in hosts config, this breaks original "expose-host" function. Also add the ``script``, ``custom-duid`` and ``validate-server-duid`` as backport from 7.15 version update (https://github.com/ansible-collections/community.routeros/pull/341). diff --git a/plugins/module_utils/_api_data.py b/plugins/module_utils/_api_data.py index f88950c2..fc50f4c9 100644 --- a/plugins/module_utils/_api_data.py +++ b/plugins/module_utils/_api_data.py @@ -3544,6 +3544,14 @@ def join_path(path): 'request': KeyInfo(), 'use-peer-dns': KeyInfo(default=True), }, + versioned_fields=[ + # Mikrotik does not provide exact version in official changelogs. + # The 7.15 version is the earliest, found option in router config backups: + ([('7.15', '>=')], 'script', KeyInfo(default='')), + ([('7.15', '>=')], 'custom-duid', KeyInfo(default='')), + ([('7.15', '>=')], 'use-interface-duid', KeyInfo(default=False)), + ([('7.15', '>=')], 'validate-server-duid', KeyInfo(default=True)), + ], ), ), ('ipv6', 'dhcp-server'): APIData(