From 1e7a135f453d2404335191abcdf8b6cc32a04ab8 Mon Sep 17 00:00:00 2001 From: Yaguang Tang Date: Sat, 25 Aug 2012 00:07:15 +0800 Subject: Remove unused and old methods in hyperv and powervm driver. fix bug lp:1040758 Change-Id: I0376384a2481e62f55a51e4a877d12c596aadaa1 --- nova/virt/hyperv/driver.py | 3 --- nova/virt/hyperv/vmops.py | 9 --------- nova/virt/powervm/driver.py | 8 -------- 3 files changed, 20 deletions(-) (limited to 'nova') diff --git a/nova/virt/hyperv/driver.py b/nova/virt/hyperv/driver.py index 85ff50e95..7e76998bb 100644 --- a/nova/virt/hyperv/driver.py +++ b/nova/virt/hyperv/driver.py @@ -87,9 +87,6 @@ class HyperVDriver(driver.ComputeDriver): def list_instances(self): 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, block_device_info=None): self._vmops.spawn(context, instance, image_meta, network_info, diff --git a/nova/virt/hyperv/vmops.py b/nova/virt/hyperv/vmops.py index 94cb7477e..aa8d34e12 100644 --- a/nova/virt/hyperv/vmops.py +++ b/nova/virt/hyperv/vmops.py @@ -64,15 +64,6 @@ class VMOps(baseops.BaseOps): Caption="Virtual Machine")] 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): """Get information about the VM""" LOG.debug(_("get_info called for instance"), instance=instance) diff --git a/nova/virt/powervm/driver.py b/nova/virt/powervm/driver.py index 1b3eba415..a45b10b3f 100644 --- a/nova/virt/powervm/driver.py +++ b/nova/virt/powervm/driver.py @@ -101,14 +101,6 @@ class PowerVMDriver(driver.ComputeDriver): def list_instances(self): 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): """Return currently known host stats""" return self._powervm.get_host_stats(refresh=refresh) -- cgit