From a4dc4c70e973e624f6a66f63ac0ced9bf45d5234 Mon Sep 17 00:00:00 2001 From: Jeenitkumar Khatri Date: Wed, 13 Nov 2024 12:50:14 +0530 Subject: [PATCH] [IMP] Normalize duid and added alias for configure_for_dhcp --- plugins/module_utils/api.py | 2 ++ plugins/modules/nios_host_record.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/module_utils/api.py b/plugins/module_utils/api.py index ce987c93..97388399 100644 --- a/plugins/module_utils/api.py +++ b/plugins/module_utils/api.py @@ -655,6 +655,8 @@ def issubset(self, item, objects): # Normalize MAC address for comparison if 'mac' in item: item['mac'] = item['mac'].replace('-', ':').lower() + elif 'duid' in item: + item['duid'] = item['duid'].replace('-', ':').lower() if all(entry in obj.items() for entry in item.items()): return True else: diff --git a/plugins/modules/nios_host_record.py b/plugins/modules/nios_host_record.py index 306b0b26..d633ec7b 100644 --- a/plugins/modules/nios_host_record.py +++ b/plugins/modules/nios_host_record.py @@ -154,6 +154,8 @@ changes it to true, user need to mention DUID address to configure. type: bool required: false + aliases: + - dhcp duid: description: - Configures the hardware DUID address for the host record. If user makes @@ -415,7 +417,7 @@ def main(): ipv6addr_spec = dict( ipv6addr=dict(required=True, aliases=['address']), - configure_for_dhcp=dict(type='bool', required=False), + configure_for_dhcp=dict(type='bool', required=False, aliases=['dhcp']), duid=dict(required=False) )