From b3db10f0ee487394b548979dadacad9e8d4335c9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mathieu=20Gagne=CC=81?= Date: Wed, 22 May 2013 12:25:40 -0400 Subject: [PATCH] Raise VolumeNotFound with correct volume_id 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cinder/volume/drivers/solidfire.py b/cinder/volume/drivers/solidfire.py index daab58a6a..e21752857 100644 --- a/cinder/volume/drivers/solidfire.py +++ b/cinder/volume/drivers/solidfire.py @@ -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'] -- 2.45.2