From a8fcfdbe8b2f46a100f986eeef5c7d43aef69bb7 Mon Sep 17 00:00:00 2001 From: KIYOHIRO ADACHI Date: Tue, 17 Sep 2013 16:08:55 +0900 Subject: [PATCH] Fixes call VolumeNotFound in the invalid argument 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 --- cinder/volume/drivers/storwize_svc.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cinder/volume/drivers/storwize_svc.py b/cinder/volume/drivers/storwize_svc.py index 581627a05..d92ef6d5e 100644 --- a/cinder/volume/drivers/storwize_svc.py +++ b/cinder/volume/drivers/storwize_svc.py @@ -1162,15 +1162,14 @@ class StorwizeSVCDriver(san.SanDriver): 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, -- 2.45.2