The instance_uuid and attached_host no longer exists
in the volume object. It's part of the attachments that
show up in volume['volume_attachment'].
This patch now tests to see if there are any volume
attachments at all via the volume['volume_attachment'] list.
Change-Id: I6b06adaf408e9458a9d4d8c73a6749bd3a282340
Closes-Bug:
1436605
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)
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)