diff --git a/cinder/exception.py b/cinder/exception.py index a0e4e48348d..7ce005ab120 100644 --- a/cinder/exception.py +++ b/cinder/exception.py @@ -967,11 +967,6 @@ class PureRetryableException(VolumeBackendAPIException): message = _("Retryable Pure Storage Exception encountered") -# RBD -class RBDDriverException(VolumeDriverException): - message = _("RBD Cinder driver failure: %(reason)s") - - # RemoteFS drivers class RemoteFSException(VolumeDriverException): message = _("Unknown RemoteFS exception") diff --git a/cinder/volume/drivers/rbd.py b/cinder/volume/drivers/rbd.py index 78d746e9b5a..616ccfee02f 100644 --- a/cinder/volume/drivers/rbd.py +++ b/cinder/volume/drivers/rbd.py @@ -134,6 +134,11 @@ EXTRA_SPECS_REPL_ENABLED = "replication_enabled" EXTRA_SPECS_MULTIATTACH = "multiattach" +# RBD +class RBDDriverException(exception.VolumeDriverException): + message = _("RBD Cinder driver failure: %(reason)s") + + class RBDVolumeProxy(object): """Context manager for dealing with an existing rbd volume. @@ -788,7 +793,7 @@ class RBDDriver(driver.CloneableImageVD, driver.MigrateVD, if want_replication and want_multiattach: msg = _('Replication and Multiattach are mutually exclusive.') - raise exception.RBDDriverException(reason=msg) + raise RBDDriverException(reason=msg) if want_replication: return self._enable_replication(volume) @@ -1201,7 +1206,7 @@ class RBDDriver(driver.CloneableImageVD, driver.MigrateVD, # feautures to restore. if self._is_multiattach_type(volume.volume_type): msg = _('Retyping from multiattach is not supported.') - raise exception.RBDDriverException(reason=msg) + raise RBDDriverException(reason=msg) old_vol_replicated = self._is_replicated_type(volume.volume_type) new_vol_replicated = self._is_replicated_type(new_type)