[Openstack] [Openstack API] operations wih status code 202 and response Body

Salvatore Orlando Salvatore.Orlando at eu.citrix.com
Tue Aug 2 00:34:11 UTC 2011


Hi,

I was looking at operations in the Openstack API which return status code 202. Most of them, such as "resize server" and "revert resize servier" do not return a response body.
Others, such as "create server" also return a response body.
I was also looking at the unit tests in tests/api/Openstack/test_servers.py, in particular ServersTest.test_create_instance, and I noticed that the assertion on the response status verifies that the returned code is 200.
Is this a divergence between the API spec and its implementation? Or am I just not reading the code correctly?

However, as we are doing something similar in Quantum for "create" operation, I was wondering how we could instruct the wsgi middleware to build a non-empty response with a status code different by the default one (200).
Any advice would be appreciated.

Thanks,
Salvatore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20110802/bae0c7a5/attachment.html>


More information about the Openstack mailing list