mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
Infoblox ipv6 support feature (#39668)
* Update nios.py * Update nios.py * Update nios.py * nios lookup errors out when there are no results #37970 Open Indentation failure issue resolved * Returning empty list instead of None In case of no results, res will be returned as an empty list instead of None (implementing ganeshrn comment) * infoblox ipv6 support changes * infoblox ipv6 support changes * for fixing pep8 errors * moving ipaddr check to utils * adding ipv6addr check * increasing space to resolve pep8 error * modified the playbook examples to valid ones * Update nios_network.py
This commit is contained in:
parent
291c89382c
commit
9c0825a4cf
2 changed files with 40 additions and 4 deletions
|
@ -359,6 +359,14 @@ def validate_ip_address(address):
|
|||
return address.count('.') == 3
|
||||
|
||||
|
||||
def validate_ip_v6_address(address):
|
||||
try:
|
||||
socket.inet_pton(socket.AF_INET6, address)
|
||||
except socket.error:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def validate_prefix(prefix):
|
||||
if prefix and not 0 <= int(prefix) <= 32:
|
||||
return False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue