From 43556dcaf0294adf964f3a9d11e4fee1daa16b6c Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Thu, 18 Oct 2012 13:37:36 +0100 Subject: Do not call directly vmops.attach_volume Relates to blueprint xenapi-volume-drivers Driver already have an attach_volume function call which calls volumeops.attach_volume. This change replaces the direct volumeops.attach_volume calls with driver.attach_volume, so that driver.attach_volume will be the entry point for attaching the volume. Change-Id: I86e7c7df3d37076d7b7945f3504c7f305dce6820 --- nova/virt/xenapi/driver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/virt/xenapi/driver.py b/nova/virt/xenapi/driver.py index 04b75598c..9620f7194 100644 --- a/nova/virt/xenapi/driver.py +++ b/nova/virt/xenapi/driver.py @@ -193,7 +193,7 @@ class XenAPIDriver(driver.ComputeDriver): for vol in block_device_mapping: connection_info = vol['connection_info'] mount_device = vol['mount_device'].rpartition("/")[2] - self._volumeops.attach_volume(connection_info, + self.attach_volume(connection_info, instance['name'], mount_device) def finish_migration(self, context, migration, instance, disk_info, @@ -207,7 +207,7 @@ class XenAPIDriver(driver.ComputeDriver): for vol in block_device_mapping: connection_info = vol['connection_info'] mount_device = vol['mount_device'].rpartition("/")[2] - self._volumeops.attach_volume(connection_info, + self.attach_volume(connection_info, instance['name'], mount_device) def snapshot(self, context, instance, image_id): -- cgit