Skip to content

Commit

Permalink
Resolving network deletion in the networks (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
hemanthKa677 authored Sep 2, 2022
1 parent c3be787 commit e8277d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/modules/nios_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,15 @@ def check_ip_addr_type(obj_filter, ib_spec):
check_ip = ip.split('/')
del ib_spec['container'] # removing the container key from post arguments
del ib_spec['options'] # removing option argument as for network container it's not supported
del ib_spec['template'] # removing template argument as it is not searchable argument
if validate_ip_address(check_ip[0]):
return NIOS_IPV4_NETWORK_CONTAINER, ib_spec
elif validate_ip_v6_address(check_ip[0]):
return NIOS_IPV6_NETWORK_CONTAINER, ib_spec
else:
check_ip = ip.split('/')
del ib_spec['container'] # removing the container key from post arguments
del ib_spec['template'] # removing template argument as it is not searchable argument
if validate_ip_address(check_ip[0]):
return NIOS_IPV4_NETWORK, ib_spec
elif validate_ip_v6_address(check_ip[0]):
Expand Down

0 comments on commit e8277d0

Please sign in to comment.