[openstack-dev] [Trove] Datastore/Versions API improvements

Denis Makogon dmakogon at mirantis.com
Wed Jul 30 15:10:17 UTC 2014


Hello, Stackers.



    I’d like to gather Trove team around question related to
Datastores/Version API responses (request/response payloads and HTTP codes).

    Small INFO

When deployer creates datastore and versions for it Troves` backend
receives request to store DBDatastore and DBDatastoreVersion objects with
certain parameters. The most interesting attribute of DBDatastoreVersion is
“packages” - it’s being stored as String object (and it’s totally fine).
But when we’re trying to query given datastore version through the
Datastores API attribute “packages” is being returned as String object too.
And it seems that it breaks response pattern - “If given attribute
represents complex attribute, such as: list, dict, tuple - it should be
returned as is.

So, the first question is - are we able to change it in terms of V1?

The second question is about admin_context decorator (see [1]). This method
executes methods of given controller and verifies that user is able to
execute certain procedure.

    Taking into account RFC 2616 this method should raise HTTP Forbidden
(code 403) if user tried to execute request that he’s not allowed to.

    But given method return HTTP Unauthorized (code 401) which seems weird
since user is authorized.

    This is definitely a bug. And it comes from [2].


[1]
https://github.com/openstack/trove/blob/master/trove/common/auth.py#L72-L87

[2]
https://github.com/openstack/trove/blob/master/trove/common/wsgi.py#L316-L318



Best regards,

Denis Makogon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140730/14ea6675/attachment.html>


More information about the OpenStack-dev mailing list