A mapping key of 'volume_id' is ignored when we use the non keyword
argument. Thus information in 'volume_id' is lost. Similarly, in the
case of exception.SnapshotNotFound, information in 'snapshot_id' is
lost.
Change-Id: I1a704cc1866ad9b0d9578e16e77c376a77ea5b3e
Closes-Bug: #
1226442
src_vdisk_attributes = self._get_vdisk_attributes(src_vdisk)
if src_vdisk_attributes is None:
exception_msg = (
- _('_create_copy: Source vdisk %s does not exist')
- % src_vdisk)
+ _('_create_copy: Source vdisk %(src_vdisk)s (%(src_id)s) '
+ 'does not exist')
+ % {'src_vdisk': src_vdisk, 'src_id': src_id})
LOG.error(exception_msg)
if from_vol:
- raise exception.VolumeNotFound(exception_msg,
- volume_id=src_id)
+ raise exception.VolumeNotFound(volume_id=src_id)
else:
- raise exception.SnapshotNotFound(exception_msg,
- snapshot_id=src_id)
+ raise exception.SnapshotNotFound(snapshot_id=src_id)
self._driver_assert(
'capacity' in src_vdisk_attributes,