summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-01-20 18:12:45 +0000
committerGerrit Code Review <review@openstack.org>2016-01-20 18:12:45 +0000
commitd56a825dde916abdfeb8203437bdea51f11b0526 (patch)
tree5e0011290d2f0c3843e97cd680924cca45f71ae2
parenta9f2bd1af0e7452e425ef314a95d8d647f5a05e6 (diff)
parent0d9ef9fe15936d9e01539480b30135f764d343fc (diff)
downloadglance_store-d56a825dde916abdfeb8203437bdea51f11b0526.tar.gz
Merge "Deprecate unused Exceptions"
-rw-r--r--glance_store/exceptions.py30
1 files changed, 29 insertions, 1 deletions
diff --git a/glance_store/exceptions.py b/glance_store/exceptions.py
index 45c790d..163e3e9 100644
--- a/glance_store/exceptions.py
+++ b/glance_store/exceptions.py
@@ -15,11 +15,13 @@
"""Glance Store exception subclasses"""
+from debtcollector import removals
import six
import six.moves.urllib.parse as urlparse
+import warnings
from glance_store import i18n
-
+warnings.simplefilter('always')
_ = i18n._
@@ -97,7 +99,9 @@ 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.")
@@ -130,15 +134,21 @@ 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.
message = _("Data supplied was not valid.")
@@ -151,7 +161,9 @@ 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")
@@ -178,7 +190,9 @@ 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.")
@@ -196,20 +210,28 @@ 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")
@@ -222,15 +244,21 @@ class InUseByStore(GlanceStoreException):
"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")