]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Clean up unused exceptions
authorSean McGinnis <sean_mcginnis@dell.com>
Wed, 3 Jun 2015 04:29:01 +0000 (23:29 -0500)
committerSean McGinnis <sean_mcginnis@dell.com>
Wed, 3 Jun 2015 13:29:21 +0000 (08:29 -0500)
Over the last cycle several drivers were removed. There
have also been changes over time in the code. As a
result, there were quite a few exception class declarations
that were no longer being used anywhere in the code base.

This removes Exception classes that were not referenced.

Change-Id: Ieed6e6e81196e7fe62d0ce22bab5620ac4a1269d

cinder/exception.py

index 5f29fe485f7c1cef083ea6445f4e8b5aceb451ab..5f4a9f5ca0cc3af4e4e4de1aad57d5668231fe61 100644 (file)
@@ -172,10 +172,6 @@ class VolumeAttached(Invalid):
     message = _("Volume %(volume_id)s is still attached, detach volume first.")
 
 
-class SfJsonEncodeFailure(CinderException):
-    message = _("Failed to load data into json format")
-
-
 class InvalidResults(Invalid):
     message = _("The results are invalid.")
 
@@ -685,69 +681,11 @@ class VolumeDeviceNotFound(CinderException):
 
 
 # Driver specific exceptions
-# Coraid
-class CoraidException(VolumeDriverException):
-    message = _('Coraid Cinder Driver exception.')
-
-
-class CoraidJsonEncodeFailure(CoraidException):
-    message = _('Failed to encode json data.')
-
-
-class CoraidESMBadCredentials(CoraidException):
-    message = _('Login on ESM failed.')
-
-
-class CoraidESMReloginFailed(CoraidException):
-    message = _('Relogin on ESM failed.')
-
-
-class CoraidESMBadGroup(CoraidException):
-    message = _('Group with name "%(group_name)s" not found.')
-
-
-class CoraidESMConfigureError(CoraidException):
-    message = _('ESM configure request failed: %(reason)s')
-
-
-class CoraidESMNotAvailable(CoraidException):
-    message = _('Coraid ESM not available with reason: %(reason)s')
-
-
 # Pure Storage
 class PureDriverException(VolumeDriverException):
     message = _("Pure Storage Cinder driver failure: %(reason)s")
 
 
-# Zadara
-class ZadaraException(VolumeDriverException):
-    message = _('Zadara Cinder Driver exception.')
-
-
-class ZadaraServerCreateFailure(ZadaraException):
-    message = _("Unable to create server object for initiator %(name)s")
-
-
-class ZadaraServerNotFound(ZadaraException):
-    message = _("Unable to find server object for initiator %(name)s")
-
-
-class ZadaraVPSANoActiveController(ZadaraException):
-    message = _("Unable to find any active VPSA controller")
-
-
-class ZadaraAttachmentsNotFound(ZadaraException):
-    message = _("Failed to retrieve attachments for volume %(name)s")
-
-
-class ZadaraInvalidAttachmentInfo(ZadaraException):
-    message = _("Invalid attachment info for volume %(name)s: %(reason)s")
-
-
-class BadHTTPResponseStatus(ZadaraException):
-    message = _("Bad HTTP response status %(status)s")
-
-
 # SolidFire
 class SolidFireAPIException(VolumeBackendAPIException):
     message = _("Bad response from SolidFire API")
@@ -827,23 +765,6 @@ class GlusterfsNoSuitableShareFound(RemoteFSNoSuitableShareFound):
     message = _("There is no share which can host %(volume_size)sG")
 
 
-# HP MSA
-class HPMSAVolumeDriverException(VolumeDriverException):
-    message = _("HP MSA Volume Driver exception")
-
-
-class HPMSAInvalidVDisk(HPMSAVolumeDriverException):
-    message = _("VDisk doesn't exist (%(vdisk)s)")
-
-
-class HPMSAConnectionError(HPMSAVolumeDriverException):
-    message = _("Unable to connect to MSA array")
-
-
-class HPMSANotEnoughSpace(HPMSAVolumeDriverException):
-    message = _("Not enough space on VDisk (%(vdisk)s)")
-
-
 # Fibre Channel Zone Manager
 class ZoneManagerException(CinderException):
     message = _("Fibre Channel connection control failure: %(reason)s")