Commit 51b13ce9 authored by Manuel Franceschini's avatar Manuel Franceschini
Browse files

Support IPv6 for instances

Signed-off-by: default avatarManuel Franceschini <>
Reviewed-by: default avatarIustin Pop <>
parent 7c4c22f5
......@@ -7003,9 +7003,8 @@ class LUCreateInstance(LogicalUnit):
nic_ip = self.hostname1.ip
if not netutils.IP4Address.IsValid(ip):
raise errors.OpPrereqError("Given IP address '%s' doesn't look"
" like a valid IP" % ip,
if not netutils.IPAddress.IsValid(ip):
raise errors.OpPrereqError("Invalid IP address '%s'" % ip,
nic_ip = ip
......@@ -8678,7 +8677,7 @@ class LUSetInstanceParams(LogicalUnit):
if nic_ip.lower() == constants.VALUE_NONE:
nic_dict['ip'] = None
if not netutils.IP4Address.IsValid(nic_ip):
if not netutils.IPAddress.IsValid(nic_ip):
raise errors.OpPrereqError("Invalid IP address '%s'" % nic_ip,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment