Skip to content

Commit

Permalink
- [NPA-113] Unable to remove dhcp options from DHCP Range using ansib…
Browse files Browse the repository at this point in the history
…le. (#248)
  • Loading branch information
JchhatbarInfoblox authored and JkhatriInfobox committed Sep 3, 2024
1 parent f06b4f7 commit f82b939
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/module_utils/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def run(self, ib_obj_type, ib_spec):
if (ib_obj_type == NIOS_IPV4_NETWORK or ib_obj_type == NIOS_IPV6_NETWORK):
proposed_object = convert_members_to_struct(proposed_object)

if ib_obj_type in {NIOS_IPV4_NETWORK_CONTAINER, NIOS_IPV6_NETWORK_CONTAINER, NIOS_IPV4_NETWORK, NIOS_IPV6_NETWORK}:
if ib_obj_type in {NIOS_IPV4_NETWORK_CONTAINER, NIOS_IPV6_NETWORK_CONTAINER, NIOS_IPV4_NETWORK, NIOS_IPV6_NETWORK, NIOS_RANGE}:

# Iterate over each option and remove the 'num' key
if current_object.get('options') or proposed_object.get('options'):
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/nios_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
of values (see suboptions). When configuring suboptions at
least one of C(name) or C(num) must be specified.
type: list
default: []
elements: dict
suboptions:
name:
Expand Down Expand Up @@ -375,7 +376,7 @@ def main():
new_end_addr=dict(aliases=['new_end', 'new_last_addr', 'new_last'], type='str'),
name=dict(type='str'),
disable=dict(type='bool', default='false',),
options=dict(type='list', elements='dict', options=option_spec, transform=options),
options=dict(type='list', elements='dict', options=option_spec, transform=options, default=[]),
member=dict(type='str'),
failover_association=dict(type='str'),
ms_server=dict(type='str'),
Expand Down

0 comments on commit f82b939

Please sign in to comment.