Remove unused exceptions

This patch cleans up cinder.exception module by deleting unused
execptions from it.

Change-Id: Idb07d69475306f43116977b5fb9b0ea863c1f65b
This commit is contained in:
Ivan Kolodyazhny 2020-06-18 12:36:10 +03:00
parent 33a25e2d00
commit e32c9b8c43
2 changed files with 0 additions and 52 deletions

View File

@ -294,10 +294,6 @@ class InvalidGlobalAPIVersion(Invalid):
"is %(min_ver)s and maximum is %(max_ver)s.")
class MissingRequired(Invalid):
message = _("Missing required element '%(element)s' in request body.")
class ValidationError(Invalid):
message = "%(detail)s"
@ -357,11 +353,6 @@ class VolumeMetadataNotFound(NotFound):
"key %(metadata_key)s.")
class VolumeAdminMetadataNotFound(NotFound):
message = _("Volume %(volume_id)s has no administration metadata with "
"key %(metadata_key)s.")
class InvalidVolumeMetadata(Invalid):
message = _("Invalid metadata: %(reason)s")
@ -449,10 +440,6 @@ class SnapshotIsBusy(CinderException):
"dependent volumes")
class ISCSITargetNotFoundForVolume(NotFound):
message = _("No target id found for volume %(volume_id)s.")
class InvalidImageRef(Invalid):
message = _("Invalid image href %(image_href)s.")
@ -563,10 +550,6 @@ class QuotaUsageNotFound(QuotaNotFound):
message = _("Quota usage for project %(project_id)s could not be found.")
class ReservationNotFound(QuotaNotFound):
message = _("Quota reservation %(uuid)s could not be found.")
class OverQuota(CinderException):
message = _("Quota exceeded for resources: %(overs)s")
@ -606,14 +589,6 @@ class GroupVolumeTypeMappingExists(Duplicate):
"%(volume_type_id)s combination already exists.")
class GroupTypeEncryptionExists(Invalid):
message = _("Group type encryption for type %(type_id)s already exists.")
class GroupTypeEncryptionNotFound(NotFound):
message = _("Group type encryption for type %(type_id)s does not exist.")
class MalformedRequestBody(CinderException):
message = _("Malformed message body: %(reason)s")
@ -630,11 +605,6 @@ class NoValidBackend(CinderException):
message = _("No valid backend was found. %(reason)s")
class NoMoreTargets(CinderException):
"""No more available targets."""
pass
class QuotaError(CinderException):
message = _("Quota exceeded: code=%(code)s")
code = 413
@ -748,10 +718,6 @@ class RemoveExportException(VolumeDriverException):
message = _("Failed to remove export for volume %(volume)s: %(reason)s")
class MetadataCreateFailure(Invalid):
message = _("Failed to create metadata for volume: %(reason)s")
class MetadataUpdateFailure(Invalid):
message = _("Failed to update metadata for volume: %(reason)s")
@ -802,10 +768,6 @@ class BackupNotFound(NotFound):
message = _("Backup %(backup_id)s could not be found.")
class BackupFailedToGetVolumeBackend(NotFound):
message = _("Failed to identify volume backend.")
class InvalidBackup(Invalid):
message = _("Invalid backup: %(reason)s")
@ -899,11 +861,6 @@ class ReplicationGroupError(CinderException):
"error: %(reason)s.")
class ReplicationNotFound(NotFound):
message = _("Volume replication for %(volume_id)s "
"could not be found.")
class ManageExistingVolumeTypeMismatch(CinderException):
message = _("Manage existing volume failed due to volume type mismatch: "
"%(reason)s")
@ -921,16 +878,8 @@ class LockCreationFailed(CinderException):
message = _('Unable to create lock. Coordination backend not started.')
class LockingFailed(CinderException):
message = _('Lock acquisition failed.')
UnsupportedObjectError = obj_exc.UnsupportedObjectError
OrphanedObjectError = obj_exc.OrphanedObjectError
IncompatibleObjectVersion = obj_exc.IncompatibleObjectVersion
ReadOnlyFieldError = obj_exc.ReadOnlyFieldError
ObjectActionError = obj_exc.ObjectActionError
ObjectFieldInvalid = obj_exc.ObjectFieldInvalid
class CappedVersionUnknown(CinderException):

View File

@ -98,7 +98,6 @@ class OnFailureRescheduleTask(flow_utils.CinderTask):
# they fail, rescheduling will likely attempt to create the volume
# on another machine when it still exists locally.
exception.MetadataCopyFailure,
exception.MetadataCreateFailure,
exception.MetadataUpdateFailure,
# The volume/snapshot has been removed from the database, that
# can not be fixed by rescheduling.