[openstack-dev] Defining API Success in OpenStack APIs (specifically Swift)

Sean Dague sean at dague.net
Thu Jun 20 11:21:20 UTC 2013


The following patch review came into Tempest yesterday to stop checking 
for specific 20x codes on a number of Swift API - 
https://review.openstack.org/#/c/33689/

The official documentation for these APIs says the following - 
http://docs.openstack.org/api/openstack-object-storage/1.0/content/retrieve-account-metadata.html

"The HTTP return code will be 2xx (between 200 and 299, inclusive) if 
the request succeeds"

This seems kind of broken to me that that's the contract provided. I've 
got a -1 on the patch right now, but I think this is worth raising for 
broader discussion. It seems to go somewhat contrary to 
https://wiki.openstack.org/wiki/APIChangeGuidelines and to the spirit of 
having stable, well defined interfaces.

So I guess I open up the question of is it ok for OpenStack core 
projects to not commit to success codes for API calls? If so, we'll let 
the test change into Tempest. If not, we probably need to call that out 
on API standards.

	-Sean

-- 
Sean Dague
http://dague.net



More information about the OpenStack-dev mailing list