From dd5b405accb81b79cd34ed2f5f3776c378844b62 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Tue, 2 Jun 2015 23:29:01 -0500 Subject: [PATCH] Clean up unused exceptions 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 | 79 --------------------------------------------- 1 file changed, 79 deletions(-) diff --git a/cinder/exception.py b/cinder/exception.py index 5f29fe485..5f4a9f5ca 100644 --- a/cinder/exception.py +++ b/cinder/exception.py @@ -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") -- 2.45.2