X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/64bfbc08feb59590a40c8d4e345a0cd34d6486ce..2ee88aeb76a2430ec0c7f86629bf66cfd0b6f564:/lib/hypervisor/hv_kvm.py diff --git a/lib/hypervisor/hv_kvm.py b/lib/hypervisor/hv_kvm.py index fdfc28a..e211475 100644 --- a/lib/hypervisor/hv_kvm.py +++ b/lib/hypervisor/hv_kvm.py @@ -56,7 +56,7 @@ class KVMHypervisor(hv_base.BaseHypervisor): constants.HV_ACPI: hv_base.NO_CHECK, constants.HV_SERIAL_CONSOLE: hv_base.NO_CHECK, constants.HV_VNC_BIND_ADDRESS: \ - (False, lambda x: (utils.IsValidIP(x) or os.path.isabs(x)), + (False, lambda x: (utils.IsValidIP(x) or utils.IsAbsNormPath(x)), "the VNC bind address must be either a valid IP address or an absolute" " pathname", None, None), constants.HV_VNC_TLS: hv_base.NO_CHECK, @@ -721,3 +721,10 @@ class KVMHypervisor(hv_base.BaseHypervisor): hvparams[constants.HV_NIC_TYPE] == constants.HT_NIC_PARAVIRTUAL): raise errors.HypervisorError("Cannot boot from a paravirtual NIC. Please" " change the NIC type.") + + @classmethod + def PowercycleNode(cls): + """KVM powercycle, just a wrapper over Linux powercycle. + + """ + cls.LinuxPowercycle()