diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-05-31 17:31:56 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-05-31 17:31:56 +0000 |
| commit | 9e8007320666797778f4a4e339fb30a681b75a22 (patch) | |
| tree | 17e6e5d37783831d42887900ed3fedee7804aa2d | |
| parent | e0a29a1edf067a338281c423d33f59951714f73c (diff) | |
| parent | 88888d1ac81969608b4d6166b2043dd3c0bc43bc (diff) | |
Merge "Remove list_disks/list_interfaces from virt driver"
| -rw-r--r-- | nova/tests/test_virt_drivers.py | 10 | ||||
| -rw-r--r-- | nova/virt/driver.py | 27 | ||||
| -rw-r--r-- | nova/virt/fake.py | 6 |
3 files changed, 0 insertions, 43 deletions
diff --git a/nova/tests/test_virt_drivers.py b/nova/tests/test_virt_drivers.py index de06905b6..249ed012d 100644 --- a/nova/tests/test_virt_drivers.py +++ b/nova/tests/test_virt_drivers.py @@ -261,16 +261,6 @@ class _VirtDriverTestCase(test.TestCase): self.connection.get_diagnostics(instance_ref['name']) @catch_notimplementederror - def test_list_disks(self): - instance_ref, network_info = self._get_running_instance() - self.connection.list_disks(instance_ref['name']) - - @catch_notimplementederror - def test_list_interfaces(self): - instance_ref, network_info = self._get_running_instance() - self.connection.list_interfaces(instance_ref['name']) - - @catch_notimplementederror def test_block_stats(self): instance_ref, network_info = self._get_running_instance() stats = self.connection.block_stats(instance_ref['name'], 'someid') diff --git a/nova/virt/driver.py b/nova/virt/driver.py index 57f7940ad..561e62b82 100644 --- a/nova/virt/driver.py +++ b/nova/virt/driver.py @@ -88,10 +88,6 @@ class ComputeDriver(object): platform-specific layer is responsible for keeping track of which instance ID maps to which platform-specific ID, and vice versa. - In contrast, the list_disks and list_interfaces calls may return - platform-specific IDs. These identify a specific virtual disk or specific - virtual network interface, and these IDs are opaque to the rest of Nova. - Some methods here take an instance of nova.compute.service.Instance. This is the data structure used by nova.compute to store details regarding an instance, and pass them into this layer. This layer is responsible for @@ -565,29 +561,6 @@ class ComputeDriver(object): """Return currently known host stats""" raise NotImplementedError() - def list_disks(self, instance_name): - """ - Return the IDs of all the virtual disks 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 - disk_stats). These IDs only need to be unique for a given instance. - - Note that this function takes an instance ID. - """ - raise NotImplementedError() - - 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. - - Note that this function takes an instance ID. - """ - raise NotImplementedError() - def resize(self, instance, flavor): """ Resizes/Migrates the specified instance. diff --git a/nova/virt/fake.py b/nova/virt/fake.py index 36cfa54d2..cb29cf567 100644 --- a/nova/virt/fake.py +++ b/nova/virt/fake.py @@ -204,12 +204,6 @@ class FakeConnection(driver.ComputeDriver): bwusage = [] return bwusage - def list_disks(self, instance_name): - return ['A_DISK'] - - def list_interfaces(self, instance_name): - return ['A_VIF'] - def block_stats(self, instance_name, disk_id): return [0L, 0L, 0L, 0L, None] |
