On 11/04/2010 11:30 AM, Michal Fojtik wrote:
On 04/11/10 09:51 -0400, Tobias Crawley wrote:
This patchset adds backend capability checking to the rabbit dsl,
allowing each operation to specify the required capability with:
with_capability :some_driver_method
If the driver does not respond to :some_driver_method, a 405 will
be returned to the client.
This has been ACK'ed by mfojtik via #deltacloud.
Yeah, actually I think this is an extra useful thing to have.
Also I have in me mind that we should expose this in API somehow.
Maybe create a new collection (/api/capabilities) and list all
possible actions from a driver here. So client can pick up that and
instead of trying executing some actions and getting 405 responses,
client should 'prepare' and for example avoid creating methods that
is not supported by backend driver.
Does it make sense to you ?
Yes, that is a great idea. The only actions that don't have capabilities defined are the */new actions, and the /api/:bucket/:blob/*
actions, as they don't use rabbit. I assume the */new actions aren't currently used by the client, and are only used for browser Deltacloud
access, but the blob actions should probably be advertised.
Can you commit the changes that we have so far? I have storage volume patches to send next that depend on these changes. How are you
currently tracking to-do tasks like adding /api/capabilities? Do you store them in a jira somewhere? I would be glad to help implement that,
but won't be able to do it right away.
FYI: I have submitted by signed CLA to [email protected].
- Toby