Introduce utils.IsValidIP{4,6}()
This patch introduces functions to check for valid IPv4 and IPv6 addresses and converts IsValidIP() to return True if it is either a IPv4 or a IPv6 address. For now we do not change the functional behavior and replace IsValidIP with IsValidIP4. This might change in the future. Signed-off-by:Manuel Franceschini <livewire@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
Showing
- lib/bootstrap.py 1 addition, 1 deletionlib/bootstrap.py
- lib/cmdlib.py 3 additions, 3 deletionslib/cmdlib.py
- lib/hypervisor/hv_kvm.py 2 additions, 2 deletionslib/hypervisor/hv_kvm.py
- lib/hypervisor/hv_xen.py 1 addition, 1 deletionlib/hypervisor/hv_xen.py
- lib/utils.py 51 additions, 9 deletionslib/utils.py
- scripts/gnt-instance 1 addition, 1 deletionscripts/gnt-instance
- test/ganeti.utils_unittest.py 38 additions, 0 deletionstest/ganeti.utils_unittest.py
Loading
Please register or sign in to comment