Merge "Replace HTTP numeric codes with constants"
This commit is contained in:
commit
a3df9831bc
@ -13,6 +13,7 @@
|
||||
"""The volumes attachments API."""
|
||||
|
||||
from oslo_log import log as logging
|
||||
from six.moves import http_client
|
||||
import webob
|
||||
|
||||
from cinder.api import common
|
||||
@ -99,7 +100,7 @@ class AttachmentsController(wsgi.Controller):
|
||||
sort_direction=sort_dirs)
|
||||
|
||||
@wsgi.Controller.api_version(mv.NEW_ATTACH)
|
||||
@wsgi.response(200)
|
||||
@wsgi.response(http_client.OK)
|
||||
@validation.schema(attachment.create)
|
||||
def create(self, req, body):
|
||||
"""Create an attachment.
|
||||
@ -269,7 +270,7 @@ class AttachmentsController(wsgi.Controller):
|
||||
attachments = self.volume_api.attachment_delete(context, attachment)
|
||||
return attachment_views.ViewBuilder.list(attachments)
|
||||
|
||||
@wsgi.response(204)
|
||||
@wsgi.response(http_client.NO_CONTENT)
|
||||
@wsgi.Controller.api_version(mv.NEW_ATTACH_COMPLETION)
|
||||
@wsgi.action('os-complete')
|
||||
def complete(self, req, id, body):
|
||||
|
@ -15,6 +15,7 @@
|
||||
|
||||
from oslo_utils import strutils
|
||||
from oslo_utils import timeutils
|
||||
from six.moves import http_client
|
||||
|
||||
from cinder.api import microversions as mv
|
||||
from cinder.api.openstack import wsgi
|
||||
@ -37,7 +38,7 @@ class WorkerController(wsgi.Controller):
|
||||
self.sch_api = sch_rpc.SchedulerAPI()
|
||||
|
||||
@wsgi.Controller.api_version(mv.WORKERS_CLEANUP)
|
||||
@wsgi.response(202)
|
||||
@wsgi.response(http_client.ACCEPTED)
|
||||
@validation.schema(workers.cleanup)
|
||||
def cleanup(self, req, body=None):
|
||||
"""Do the cleanup on resources from a specific service/host/node."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user