Revision 51b13ce9
b/lib/cmdlib.py | ||
---|---|---|
7003 | 7003 |
errors.ECODE_INVAL) |
7004 | 7004 |
nic_ip = self.hostname1.ip |
7005 | 7005 |
else: |
7006 |
if not netutils.IP4Address.IsValid(ip): |
|
7007 |
raise errors.OpPrereqError("Given IP address '%s' doesn't look" |
|
7008 |
" like a valid IP" % ip, |
|
7006 |
if not netutils.IPAddress.IsValid(ip): |
|
7007 |
raise errors.OpPrereqError("Invalid IP address '%s'" % ip, |
|
7009 | 7008 |
errors.ECODE_INVAL) |
7010 | 7009 |
nic_ip = ip |
7011 | 7010 |
|
... | ... | |
8678 | 8677 |
if nic_ip.lower() == constants.VALUE_NONE: |
8679 | 8678 |
nic_dict['ip'] = None |
8680 | 8679 |
else: |
8681 |
if not netutils.IP4Address.IsValid(nic_ip):
|
|
8680 |
if not netutils.IPAddress.IsValid(nic_ip): |
|
8682 | 8681 |
raise errors.OpPrereqError("Invalid IP address '%s'" % nic_ip, |
8683 | 8682 |
errors.ECODE_INVAL) |
8684 | 8683 |
|
Also available in: Unified diff