Merge "Remove unused exceptions from glance"
This commit is contained in:
commit
c2163e0b24
|
@ -212,8 +212,6 @@ class ImageDataController(object):
|
|||
msg = _('The requested image is in status %s. '
|
||||
'Image data download is forbidden.') % image.status
|
||||
raise exception.Forbidden(message=msg)
|
||||
except exception.ImageDataNotFound as e:
|
||||
raise webob.exc.HTTPNoContent(explanation=e.msg)
|
||||
except exception.NotFound as e:
|
||||
raise webob.exc.HTTPNotFound(explanation=e.msg)
|
||||
except exception.Forbidden as e:
|
||||
|
|
|
@ -424,7 +424,7 @@ class ArtifactsController(object):
|
|||
raise webob.exc.HTTPForbidden(explanation=e.msg)
|
||||
except (glance_store.NotFound, exception.NotFound) as e:
|
||||
raise webob.exc.HTTPNotFound(explanation=e.msg)
|
||||
except (glance_store.Invalid, exception.Invalid) as e:
|
||||
except exception.Invalid as e:
|
||||
raise webob.exc.HTTPBadRequest(explanation=e.msg)
|
||||
|
||||
def _restore(self, artifact_repo, artifact):
|
||||
|
|
|
@ -286,10 +286,6 @@ class InvalidObject(GlanceException):
|
|||
"'%(schema)s': %(reason)s")
|
||||
|
||||
|
||||
class UnsupportedHeaderFeature(GlanceException):
|
||||
message = _("Provided header feature is unsupported: %(feature)s")
|
||||
|
||||
|
||||
class ImageSizeLimitExceeded(GlanceException):
|
||||
message = _("The provided image is too large.")
|
||||
|
||||
|
@ -356,10 +352,6 @@ class DuplicateLocation(Duplicate):
|
|||
message = _("The location %(location)s already exists")
|
||||
|
||||
|
||||
class ImageDataNotFound(NotFound):
|
||||
message = _("No image data could be found")
|
||||
|
||||
|
||||
class InvalidParameterValue(Invalid):
|
||||
message = _("Invalid value '%(value)s' for parameter '%(param)s': "
|
||||
"%(extra_msg)s")
|
||||
|
|
Loading…
Reference in New Issue