Merge "Correct attachment create success response code"

This commit is contained in:
Zuul 2018-03-07 22:10:18 +00:00 committed by Gerrit Code Review
commit bb71d676db
2 changed files with 4 additions and 4 deletions

View File

@ -180,7 +180,7 @@ Creates an attachment.
Available starting in the 3.27 microversion.
Normal response codes: 202
Normal response codes: 200
Error response codes: badRequest(400), itemNotFound(404)
@ -285,7 +285,7 @@ Complete an attachment for a cinder volume.
Available starting in the 3.44 microversion.
Normal response codes: 202
Normal response codes: 204
Error response codes: badRequest(400), itemNotFound(404)

View File

@ -97,7 +97,7 @@ class AttachmentsController(wsgi.Controller):
sort_direction=sort_dirs)
@wsgi.Controller.api_version(mv.NEW_ATTACH)
@wsgi.response(202)
@wsgi.response(200)
@validation.schema(attachment.create)
def create(self, req, body):
"""Create an attachment.
@ -258,7 +258,7 @@ class AttachmentsController(wsgi.Controller):
attachments = self.volume_api.attachment_delete(context, attachment)
return attachment_views.ViewBuilder.list(attachments)
@wsgi.response(202)
@wsgi.response(204)
@wsgi.Controller.api_version(mv.NEW_ATTACH_COMPLETION)
@wsgi.action('os-complete')
def complete(self, req, id, body):