diff --git a/lib/hypervisor/hv_kvm.py b/lib/hypervisor/hv_kvm.py index fce3575cf5b778adb5a23f7f8572cca5742f252d..c01b391db21bd9d92c21a0d0b6d2ec7049ab1c7c 100644 --- a/lib/hypervisor/hv_kvm.py +++ b/lib/hypervisor/hv_kvm.py @@ -75,23 +75,26 @@ class KVMHypervisor(hv_base.BaseHypervisor): return (pidfile, pid, alive) - def _InstanceMonitor(self, instance_name): + @classmethod + def _InstanceMonitor(cls, instance_name): """Returns the instance monitor socket name """ - return '%s/%s.monitor' % (self._CTRL_DIR, instance_name) + return '%s/%s.monitor' % (cls._CTRL_DIR, instance_name) - def _InstanceSerial(self, instance_name): + @classmethod + def _InstanceSerial(cls, instance_name): """Returns the instance serial socket name """ - return '%s/%s.serial' % (self._CTRL_DIR, instance_name) + return '%s/%s.serial' % (cls._CTRL_DIR, instance_name) - def _InstanceKVMRuntime(self, instance_name): + @classmethod + def _InstanceKVMRuntime(cls, instance_name): """Returns the instance KVM runtime filename """ - return '%s/%s.runtime' % (self._CONF_DIR, instance_name) + return '%s/%s.runtime' % (cls._CONF_DIR, instance_name) def _WriteNetScript(self, instance, seq, nic): """Write a script to connect a net interface to the proper bridge.