Remove unused and old methods in hyperv and powervm driver.
fix bug lp:1040758 Change-Id: I0376384a2481e62f55a51e4a877d12c596aadaa1
This commit is contained in:
@@ -87,9 +87,6 @@ class HyperVDriver(driver.ComputeDriver):
|
|||||||
def list_instances(self):
|
def list_instances(self):
|
||||||
return self._vmops.list_instances()
|
return self._vmops.list_instances()
|
||||||
|
|
||||||
def list_instances_detail(self):
|
|
||||||
return self._vmops.list_instances_detail()
|
|
||||||
|
|
||||||
def spawn(self, context, instance, image_meta, network_info,
|
def spawn(self, context, instance, image_meta, network_info,
|
||||||
block_device_info=None):
|
block_device_info=None):
|
||||||
self._vmops.spawn(context, instance, image_meta, network_info,
|
self._vmops.spawn(context, instance, image_meta, network_info,
|
||||||
|
|||||||
@@ -64,15 +64,6 @@ class VMOps(baseops.BaseOps):
|
|||||||
Caption="Virtual Machine")]
|
Caption="Virtual Machine")]
|
||||||
return vms
|
return vms
|
||||||
|
|
||||||
def list_instances_detail(self):
|
|
||||||
instance_infos = []
|
|
||||||
for instance_name in self.list_instances():
|
|
||||||
info = self._get_info(instance_name)
|
|
||||||
instance_info = driver.InstanceInfo(
|
|
||||||
instance_name, int(info['state']))
|
|
||||||
instance_infos.append(instance_info)
|
|
||||||
return instance_infos
|
|
||||||
|
|
||||||
def get_info(self, instance):
|
def get_info(self, instance):
|
||||||
"""Get information about the VM"""
|
"""Get information about the VM"""
|
||||||
LOG.debug(_("get_info called for instance"), instance=instance)
|
LOG.debug(_("get_info called for instance"), instance=instance)
|
||||||
|
|||||||
@@ -101,14 +101,6 @@ class PowerVMDriver(driver.ComputeDriver):
|
|||||||
def list_instances(self):
|
def list_instances(self):
|
||||||
return self._powervm.list_instances()
|
return self._powervm.list_instances()
|
||||||
|
|
||||||
def list_instances_detail(self):
|
|
||||||
"""Return a list of InstanceInfo for all registered VMs"""
|
|
||||||
infos = []
|
|
||||||
for instance_name in self.list_instances():
|
|
||||||
state = self._powervm.get_info(instance_name)['state']
|
|
||||||
infos.append(driver.InstanceInfo(instance_name, state))
|
|
||||||
return infos
|
|
||||||
|
|
||||||
def get_host_stats(self, refresh=False):
|
def get_host_stats(self, refresh=False):
|
||||||
"""Return currently known host stats"""
|
"""Return currently known host stats"""
|
||||||
return self._powervm.get_host_stats(refresh=refresh)
|
return self._powervm.get_host_stats(refresh=refresh)
|
||||||
|
|||||||
Reference in New Issue
Block a user