Revision 8b312c1d lib/hypervisor/hv_kvm.py
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
175 | 175 |
constants.HV_ACPI: hv_base.NO_CHECK, |
176 | 176 |
constants.HV_SERIAL_CONSOLE: hv_base.NO_CHECK, |
177 | 177 |
constants.HV_VNC_BIND_ADDRESS: |
178 |
(False, lambda x: (netutils.IsValidIP4(x) or utils.IsNormAbsPath(x)), |
|
178 |
(False, lambda x: (netutils.IP4Address.IsValid(x) or |
|
179 |
utils.IsNormAbsPath(x)), |
|
179 | 180 |
"the VNC bind address must be either a valid IP address or an absolute" |
180 | 181 |
" pathname", None, None), |
181 | 182 |
constants.HV_VNC_TLS: hv_base.NO_CHECK, |
... | ... | |
572 | 573 |
|
573 | 574 |
vnc_bind_address = hvp[constants.HV_VNC_BIND_ADDRESS] |
574 | 575 |
if vnc_bind_address: |
575 |
if netutils.IsValidIP4(vnc_bind_address):
|
|
576 |
if netutils.IP4Address.IsValid(vnc_bind_address):
|
|
576 | 577 |
if instance.network_port > constants.VNC_BASE_PORT: |
577 | 578 |
display = instance.network_port - constants.VNC_BASE_PORT |
578 | 579 |
if vnc_bind_address == constants.IP4_ADDRESS_ANY: |
Also available in: Unified diff