]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Raise VolumeNotFound with correct volume_id
authorMathieu Gagné <mgagne@iweb.com>
Wed, 22 May 2013 16:25:40 +0000 (12:25 -0400)
committerMathieu Gagné <mgagne@iweb.com>
Wed, 22 May 2013 16:30:00 +0000 (12:30 -0400)
Make sure VolumeNotFound is raised with the correct volume_id
in the SolidFire driver. Some exceptions were wrongfully referring
to an undefined variable named uuid.

Fixes: bug #1182966
Change-Id: Ied101fc9778f51dfb74b39f466c2c13d6e775a40

cinder/volume/drivers/solidfire.py

index daab58a6af1c3ac87bf602b6f4ae93b2fb0274d2..e217528579f29002584fd168e1b69e3294a56d95 100644 (file)
@@ -280,7 +280,7 @@ class SolidFire(SanISCSIDriver):
         if not found_volume:
             LOG.error(_('Failed to retrieve volume SolidFire-'
                         'ID: %s in get_by_account!') % sf_volume_id)
-            raise exception.VolumeNotFound(volume_id=uuid)
+            raise exception.VolumeNotFound(volume_id=sf_volume_id)
 
         model_update = {}
         # NOTE(john-griffith): SF volumes are always at lun 0
@@ -309,7 +309,7 @@ class SolidFire(SanISCSIDriver):
 
         sf_vol = self._get_sf_volume(src_uuid, params)
         if sf_vol is None:
-            raise exception.VolumeNotFound(volume_id=uuid)
+            raise exception.VolumeNotFound(volume_id=src_uuid)
 
         if 'qos' in sf_vol:
             qos = sf_vol['qos']