incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Fojtik <mfoj...@redhat.com>
Subject Re: [PATCH 0/3] Add capability checking to rabbit and server.rb
Date Thu, 04 Nov 2010 15:30:59 GMT
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 ?

  -- Michal

>
>Tobias Crawley (3):
>  Add support files for capability checking.
>  Add capability checking to rabbit and to key management initially.
>  Added capability checking for all operations.
>
> server/lib/deltacloud/backend_capability.rb        |   21 +++++++++++
> server/lib/sinatra/rabbit.rb                       |    3 ++
> server/server.rb                                   |   36 +++++++++++++++----
> .../errors/backend_capability_failure.html.haml    |   11 ++++++
> .../errors/backend_capability_failure.xml.haml     |    4 ++
> 5 files changed, 67 insertions(+), 8 deletions(-)
> create mode 100644 server/lib/deltacloud/backend_capability.rb
> create mode 100644 server/views/errors/backend_capability_failure.html.haml
> create mode 100644 server/views/errors/backend_capability_failure.xml.haml
>
>--
>1.7.2.3
>

-- 
--------------------------------------------------------
Michal Fojtik, mfojtik@redhat.com
Deltacloud API: http://deltacloud.org
--------------------------------------------------------

Mime
View raw message