Skip to content

Commit

Permalink
[IMP] Normalize duid and added alias for configure_for_dhcp
Browse files Browse the repository at this point in the history
  • Loading branch information
JkhatriInfobox committed Nov 13, 2024
1 parent 5e18780 commit a4dc4c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions plugins/module_utils/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 3 additions & 1 deletion plugins/modules/nios_host_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
)

Expand Down

0 comments on commit a4dc4c7

Please sign in to comment.