Revision c0c3fa27 lib/hypervisor/hv_kvm.py
b/lib/hypervisor/hv_kvm.py | ||
---|---|---|
71 | 71 |
constants.HV_ACPI: hv_base.NO_CHECK, |
72 | 72 |
constants.HV_SERIAL_CONSOLE: hv_base.NO_CHECK, |
73 | 73 |
constants.HV_VNC_BIND_ADDRESS: |
74 |
(False, lambda x: (utils.IsValidIP(x) or utils.IsNormAbsPath(x)), |
|
74 |
(False, lambda x: (utils.IsValidIP4(x) or utils.IsNormAbsPath(x)),
|
|
75 | 75 |
"the VNC bind address must be either a valid IP address or an absolute" |
76 | 76 |
" pathname", None, None), |
77 | 77 |
constants.HV_VNC_TLS: hv_base.NO_CHECK, |
... | ... | |
514 | 514 |
|
515 | 515 |
vnc_bind_address = hvp[constants.HV_VNC_BIND_ADDRESS] |
516 | 516 |
if vnc_bind_address: |
517 |
if utils.IsValidIP(vnc_bind_address): |
|
517 |
if utils.IsValidIP4(vnc_bind_address):
|
|
518 | 518 |
if instance.network_port > constants.VNC_BASE_PORT: |
519 | 519 |
display = instance.network_port - constants.VNC_BASE_PORT |
520 | 520 |
if vnc_bind_address == constants.IP4_ADDRESS_ANY: |
Also available in: Unified diff