diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-06-12 23:29:52 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-06-12 23:29:52 +0000 |
| commit | cd8408abe8962e03776c0f6eec1e3d740e84ebde (patch) | |
| tree | 6a593a7c0c2479e517f3705211a6d225c7281a58 | |
| parent | 5dc070343cfc9356673ee792f3b1691f4e62fd0e (diff) | |
| parent | 5b804e51413adfe15a32eb40e904a02e5a1166f9 (diff) | |
Merge "Remove unused method in VMware driver."
| -rw-r--r-- | nova/tests/virt/vmwareapi/test_vmwareapi.py | 6 | ||||
| -rwxr-xr-x | nova/virt/vmwareapi/driver.py | 10 | ||||
| -rw-r--r-- | nova/virt/vmwareapi/vmops.py | 25 |
3 files changed, 0 insertions, 41 deletions
diff --git a/nova/tests/virt/vmwareapi/test_vmwareapi.py b/nova/tests/virt/vmwareapi/test_vmwareapi.py index da9ed1467..dd1a0e923 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 916913187..1cdaee2f5 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 3d6ef86af..23c85025b 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 |
