Remove deprecated exceptions
Many exceptions have been deprecated since 0.10.0 glance_store release and it's about time to remove them. This commits removes such exceptions from glance_store/exceptions.py file . As there are no tests associated with these exceptions, no tests have been removed. This commit has been tested locally with the glance unit tests on py27, pep8, releasenotes, docs test environments to ensure glance works with it. Change-Id: I24b4f8c56e60d1ff9fc970465fa155d01b349288
This commit is contained in:
parent
ad2c5ef5c5
commit
a7ba2908eb
@ -15,7 +15,6 @@
|
||||
|
||||
"""Glance Store exception subclasses"""
|
||||
|
||||
from debtcollector import removals
|
||||
import six
|
||||
import six.moves.urllib.parse as urlparse
|
||||
import warnings
|
||||
@ -94,13 +93,6 @@ class Duplicate(GlanceStoreException):
|
||||
message = _("Image %(image)s already exists")
|
||||
|
||||
|
||||
@removals.remove(version="0.10.0")
|
||||
class Conflict(GlanceStoreException):
|
||||
"""DEPRECATED!"""
|
||||
message = _("An object with the same identifier is currently being "
|
||||
"operated on.")
|
||||
|
||||
|
||||
class StorageFull(GlanceStoreException):
|
||||
message = _("There is not enough disk space on the image storage media.")
|
||||
|
||||
@ -129,18 +121,6 @@ class Forbidden(GlanceStoreException):
|
||||
message = _("You are not authorized to complete this action.")
|
||||
|
||||
|
||||
@removals.remove(version="0.10.0")
|
||||
class ForbiddenPublicImage(Forbidden):
|
||||
"""DEPRECATED!"""
|
||||
message = _("You are not authorized to complete this action.")
|
||||
|
||||
|
||||
@removals.remove(version="0.10.0")
|
||||
class ProtectedImageDelete(Forbidden):
|
||||
"""DEPRECATED!"""
|
||||
message = _("Image %(image_id)s is protected and cannot be deleted.")
|
||||
|
||||
|
||||
class Invalid(GlanceStoreException):
|
||||
# NOTE(NiallBunting) This could be deprecated however the debtcollector
|
||||
# seems to have problems deprecating this as well as the subclasses.
|
||||
@ -156,13 +136,6 @@ class DriverLoadFailure(GlanceStoreException):
|
||||
message = _("Driver %(driver_name)s could not be loaded.")
|
||||
|
||||
|
||||
@removals.remove(version="0.10.0")
|
||||
class BadDriverConfiguration(GlanceStoreException):
|
||||
"""DEPRECATED!"""
|
||||
message = _("Driver %(driver_name)s could not be configured correctly. "
|
||||
"Reason: %(reason)s")
|
||||
|
||||
|
||||
class StoreDeleteNotSupported(GlanceStoreException):
|
||||
message = _("Deleting images from this store is not supported.")
|
||||
|
||||
@ -185,12 +158,6 @@ class MaxRedirectsExceeded(GlanceStoreException):
|
||||
message = _("Maximum redirects (%(redirects)s) was exceeded.")
|
||||
|
||||
|
||||
@removals.remove(version="0.10.0")
|
||||
class InvalidRedirect(GlanceStoreException):
|
||||
"""DEPRECATED!"""
|
||||
message = _("Received invalid HTTP redirect.")
|
||||
|
||||
|
||||
class NoServiceEndpoint(GlanceStoreException):
|
||||
message = _("Response from Keystone does not contain a Glance endpoint.")
|
||||
|
||||
@ -205,31 +172,6 @@ class RemoteServiceUnavailable(GlanceStoreException):
|
||||
message = _("Remote server where the image is present is unavailable.")
|
||||
|
||||
|
||||
@removals.remove(version="0.10.0")
|
||||
class WorkerCreationFailure(GlanceStoreException):
|
||||
"""DEPRECATED!"""
|
||||
message = _("Server worker creation failed: %(reason)s.")
|
||||
|
||||
|
||||
@removals.remove(version="0.10.0")
|
||||
class SchemaLoadError(GlanceStoreException):
|
||||
"""DEPRECATED!"""
|
||||
message = _("Unable to load schema: %(reason)s")
|
||||
|
||||
|
||||
@removals.remove(version="0.10.0")
|
||||
class InvalidObject(GlanceStoreException):
|
||||
"""DEPRECATED!"""
|
||||
message = _("Provided object does not match schema "
|
||||
"'%(schema)s': %(reason)s")
|
||||
|
||||
|
||||
@removals.remove(version="0.10.0")
|
||||
class UnsupportedHeaderFeature(GlanceStoreException):
|
||||
"""DEPRECATED!"""
|
||||
message = _("Provided header feature is unsupported: %(feature)s")
|
||||
|
||||
|
||||
class HasSnapshot(GlanceStoreException):
|
||||
message = _("The image cannot be deleted because it has snapshot(s).")
|
||||
|
||||
@ -237,23 +179,3 @@ class HasSnapshot(GlanceStoreException):
|
||||
class InUseByStore(GlanceStoreException):
|
||||
message = _("The image cannot be deleted because it is in use through "
|
||||
"the backend store outside of Glance.")
|
||||
|
||||
|
||||
@removals.remove(version="0.10.0")
|
||||
class ImageDataNotFound(NotFound):
|
||||
"""DEPRECATED!"""
|
||||
message = _("No image data could be found")
|
||||
|
||||
|
||||
@removals.remove(version="0.10.0")
|
||||
class InvalidParameterValue(Invalid):
|
||||
"""DEPRECATED!"""
|
||||
message = _("Invalid value '%(value)s' for parameter '%(param)s': "
|
||||
"%(extra_msg)s")
|
||||
|
||||
|
||||
@removals.remove(version="0.10.0")
|
||||
class InvalidImageStatusTransition(Invalid):
|
||||
"""DEPRECATED!"""
|
||||
message = _("Image status transition from %(cur_status)s to"
|
||||
" %(new_status)s is not allowed")
|
||||
|
Loading…
Reference in New Issue
Block a user