]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix retype return value in volume driver base class
authorJon Bernard <jobernar@redhat.com>
Fri, 6 Mar 2015 20:26:19 +0000 (15:26 -0500)
committerEric Harney <eharney@redhat.com>
Thu, 12 Mar 2015 16:09:35 +0000 (12:09 -0400)
Instead of raising an exception, the expected behaviour is to return
a tuple indicating that the driver does not support retype operation.

Closes-Bug: #1430605

Change-Id: I395dfc3213bb560767ac3fc95e5d68c4a87a7640

cinder/volume/driver.py

index ea0afe8c4b6069d8b39ba348f53eff4847ddf913..228badb3672ce7611898cf873a8e854c4f276be2 100644 (file)
@@ -1101,8 +1101,7 @@ class VolumeDriver(ConsistencyGroupVD, TransferVD, ManageableVD, ExtendVD,
         raise NotImplementedError(msg)
 
     def retype(self, context, volume, new_type, diff, host):
-        msg = _("Retype existing volume not implemented.")
-        raise NotImplementedError(msg)
+        return False, None
 
     def reenable_replication(self, context, volume):
         msg = _("sync_replica not implemented.")