openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #03386
[Openstack API] operations wih status code 202 and response Body
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