]> xenbits.xensource.com Git - osstest/openstack-nova.git/commitdiff
Add TODO for returning a 202 from the volume attach API
authorMatt Riedemann <mriedem@us.ibm.com>
Wed, 23 Nov 2016 01:44:53 +0000 (20:44 -0500)
committerMatt Riedemann <mriedem@us.ibm.com>
Wed, 23 Nov 2016 01:47:43 +0000 (20:47 -0500)
Attaching a volume is an RPC cast from the API node to the
compute node, so we should return a 202 instead of a 200
in the response. Making that change would break Tempest though
which expects a 200 response code, and we have several other
APIs with similar response code issues:

http://paste.openstack.org/show/590154/

So this just adds a TODO for the same bucket of issues which
we'll probably need to handle in a single microversion.

Change-Id: I0bee2ea8681cc001dd490607213bc987ec70301f

nova/api/openstack/compute/volumes.py

index 05cdccdc43ec45e00a0bbb6441432f9b7724566e..f6d959cd24b06f839e4ddbe15ddbd1eea5bca5c3 100644 (file)
@@ -302,6 +302,7 @@ class VolumeAttachmentController(wsgi.Controller):
             instance.uuid,
             assigned_mountpoint)}
 
+    # TODO(mriedem): This API should return a 202 instead of a 200 response.
     @extensions.expected_errors((400, 404, 409))
     @validation.schema(volumes_schema.create_volume_attachment)
     def create(self, req, server_id, body):