Use http code constant instead of int
To keep the consistency, using http_client.ACCEPTED instead of 202 Change-Id: I9c1a5dedfe0cf1a34224727284b3531b17ea9c1c
This commit is contained in:
parent
935f21736a
commit
0cd1fe5d50
|
@ -1225,7 +1225,7 @@ class AdminActionsMixin(object):
|
|||
self._update(context, id, update)
|
||||
except exception.NotFound as e:
|
||||
raise webob.exc.HTTPNotFound(six.text_type(e))
|
||||
return webob.Response(status_int=202)
|
||||
return webob.Response(status_int=http_client.ACCEPTED)
|
||||
|
||||
@Controller.authorize('force_delete')
|
||||
def _force_delete(self, req, id, body):
|
||||
|
@ -1236,7 +1236,7 @@ class AdminActionsMixin(object):
|
|||
except exception.NotFound as e:
|
||||
raise webob.exc.HTTPNotFound(six.text_type(e))
|
||||
self._delete(context, resource, force=True)
|
||||
return webob.Response(status_int=202)
|
||||
return webob.Response(status_int=http_client.ACCEPTED)
|
||||
|
||||
|
||||
class Fault(webob.exc.HTTPException):
|
||||
|
|
|
@ -66,7 +66,7 @@ class DatasetController(wsgi.Controller, wsgi.AdminActionsMixin):
|
|||
except exception.InvalidLearning as e:
|
||||
raise exc.HTTPForbidden(explanation=six.text_type(e))
|
||||
|
||||
return webob.Response(status_int=202)
|
||||
return webob.Response(status_int=http_client.ACCEPTED)
|
||||
|
||||
def index(self, req):
|
||||
"""Returns a summary list of datasets."""
|
||||
|
|
|
@ -66,7 +66,7 @@ class ExperimentController(wsgi.Controller, wsgi.AdminActionsMixin):
|
|||
except exception.InvalidLearning as e:
|
||||
raise exc.HTTPForbidden(explanation=six.text_type(e))
|
||||
|
||||
return webob.Response(status_int=202)
|
||||
return webob.Response(status_int=http_client.ACCEPTED)
|
||||
|
||||
def index(self, req):
|
||||
"""Returns a summary list of experiments."""
|
||||
|
|
|
@ -66,7 +66,7 @@ class LearningController(wsgi.Controller, wsgi.AdminActionsMixin):
|
|||
except exception.InvalidLearning as e:
|
||||
raise exc.HTTPForbidden(explanation=six.text_type(e))
|
||||
|
||||
return webob.Response(status_int=202)
|
||||
return webob.Response(status_int=http_client.ACCEPTED)
|
||||
|
||||
def index(self, req):
|
||||
"""Returns a summary list of learnings."""
|
||||
|
|
|
@ -67,7 +67,7 @@ class ModelEvaluationController(wsgi.Controller, wsgi.AdminActionsMixin):
|
|||
except exception.InvalidLearning as e:
|
||||
raise exc.HTTPForbidden(explanation=six.text_type(e))
|
||||
|
||||
return webob.Response(status_int=202)
|
||||
return webob.Response(status_int=http_client.ACCEPTED)
|
||||
|
||||
def index(self, req):
|
||||
"""Returns a summary list of model evaluations."""
|
||||
|
|
|
@ -177,7 +177,7 @@ class ModelController(wsgi.Controller, ModelMixin, wsgi.AdminActionsMixin):
|
|||
except exception.InvalidLearning as e:
|
||||
raise exc.HTTPForbidden(explanation=six.text_type(e))
|
||||
|
||||
return webob.Response(status_int=202)
|
||||
return webob.Response(status_int=http_client.ACCEPTED)
|
||||
|
||||
def index(self, req):
|
||||
"""Returns a summary list of models."""
|
||||
|
|
|
@ -64,7 +64,7 @@ class TemplateController(wsgi.Controller, wsgi.AdminActionsMixin):
|
|||
except exception.InvalidLearning as e:
|
||||
raise exc.HTTPForbidden(explanation=six.text_type(e))
|
||||
|
||||
return webob.Response(status_int=202)
|
||||
return webob.Response(status_int=http_client.ACCEPTED)
|
||||
|
||||
def index(self, req):
|
||||
"""Returns a summary list of templates."""
|
||||
|
|
Loading…
Reference in New Issue