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:
Sumit Jaiswal 2018-05-15 08:24:48 +05:30 committed by GitHub
parent 291c89382c
commit 9c0825a4cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 4 deletions

View file

@ -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