diff --git a/nova/tests/virt/vmwareapi/test_vmwareapi.py b/nova/tests/virt/vmwareapi/test_vmwareapi.py index da9ed1467c..dd1a0e923e 100644 --- a/nova/tests/virt/vmwareapi/test_vmwareapi.py +++ b/nova/tests/virt/vmwareapi/test_vmwareapi.py @@ -216,12 +216,6 @@ class VMwareAPIVMTestCase(test.TestCase): instances = self.conn.list_instances() self.assertEquals(len(instances), 1) - def test_list_interfaces(self): - self._create_vm() - interfaces = self.conn.list_interfaces(1) - self.assertEquals(len(interfaces), 1) - self.assertEquals(interfaces[0], 4000) - def test_spawn(self): self._create_vm() info = self.conn.get_info({'name': 1}) diff --git a/nova/virt/vmwareapi/driver.py b/nova/virt/vmwareapi/driver.py index 9169131878..1cdaee2f5e 100755 --- a/nova/virt/vmwareapi/driver.py +++ b/nova/virt/vmwareapi/driver.py @@ -329,16 +329,6 @@ class VMwareESXDriver(driver.ComputeDriver): """Unplug VIFs from networks.""" self._vmops.unplug_vifs(instance, network_info) - def list_interfaces(self, instance_name): - """ - Return the IDs of all the virtual network interfaces attached to the - specified instance, as a list. These IDs are opaque to the caller - (they are only useful for giving back to this layer as a parameter to - interface_stats). These IDs only need to be unique for a given - instance. - """ - return self._vmops.list_interfaces(instance_name) - class VMwareVCDriver(VMwareESXDriver): """The ESX host connection object.""" diff --git a/nova/virt/vmwareapi/vmops.py b/nova/virt/vmwareapi/vmops.py index 3d6ef86af9..23c85025b4 100644 --- a/nova/virt/vmwareapi/vmops.py +++ b/nova/virt/vmwareapi/vmops.py @@ -1323,28 +1323,3 @@ class VMwareVMOps(object): def unplug_vifs(self, instance, network_info): """Unplug VIFs from networks.""" pass - - def list_interfaces(self, instance_name): - """ - Return the IDs of all the virtual network interfaces attached to the - specified instance, as a list. These IDs are opaque to the caller - (they are only useful for giving back to this layer as a parameter to - interface_stats). These IDs only need to be unique for a given - instance. - """ - vm_ref = vm_util.get_vm_ref_from_name(self._session, instance_name) - if vm_ref is None: - raise exception.InstanceNotFound(instance_id=instance_name) - - interfaces = [] - # Get the virtual network interfaces attached to the VM - hardware_devices = self._session._call_method(vim_util, - "get_dynamic_property", vm_ref, - "VirtualMachine", "config.hardware.device") - - for device in hardware_devices: - if device.__class__.__name__ in ["VirtualE1000", "VirtualE1000e", - "VirtualPCNet32", "VirtualVmxnet"]: - interfaces.append(device.key) - - return interfaces