Merge "Hitachi: Fix access to volume instance_uuid"

This commit is contained in:
Jenkins 2015-03-30 19:57:21 +00:00 committed by Gerrit Code Review
commit 00ca77befe
2 changed files with 2 additions and 2 deletions

View File

@ -505,7 +505,7 @@ class HBSDFCDriver(cinder.volume.driver.FibreChannelDriver):
def copy_volume_to_image(self, context, volume, image_service, image_meta):
self.do_setup_status.wait()
if (volume['instance_uuid'] or volume['attached_host']):
if volume['volume_attachment']:
desc = 'volume %s' % volume['id']
msg = basic_lib.output_err(660, desc=desc)
raise exception.HBSDError(message=msg)

View File

@ -410,7 +410,7 @@ class HBSDISCSIDriver(cinder.volume.driver.ISCSIDriver):
def copy_volume_to_image(self, context, volume, image_service, image_meta):
self.do_setup_status.wait()
if (volume['instance_uuid'] or volume['attached_host']):
if volume['volume_attachment']:
desc = 'volume %s' % volume['id']
msg = basic_lib.output_err(660, desc=desc)
raise exception.HBSDError(message=msg)