You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2012/10/29 14:49:54 UTC

git commit: Core: Expand API features in entrypoint

Updated Branches:
  refs/heads/master b0a01c5bd -> 13fa83417


Core: Expand API features in entrypoint

* Added :rel attribute to describe what operation given feature extend
* Added list of params, so clients can discover them

Signed-off-by: Michal fojtik <mf...@redhat.com>


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/13fa8341
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/13fa8341
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/13fa8341

Branch: refs/heads/master
Commit: 13fa83417d1112409c3155f5d314d5df42773b73
Parents: b0a01c5
Author: Michal Fojtik <mf...@redhat.com>
Authored: Mon Oct 8 16:21:55 2012 +0200
Committer: Michal fojtik <mf...@redhat.com>
Committed: Mon Oct 29 14:49:35 2012 +0100

----------------------------------------------------------------------
 server/views/api/show.xml.haml |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/13fa8341/server/views/api/show.xml.haml
----------------------------------------------------------------------
diff --git a/server/views/api/show.xml.haml b/server/views/api/show.xml.haml
index c9d970e..f21f69b 100644
--- a/server/views/api/show.xml.haml
+++ b/server/views/api/show.xml.haml
@@ -2,6 +2,9 @@
   - @collections.each do |c|
     %link{ :rel => c.collection_name, :href => self.send(:"#{c.collection_name}_url")}
       - c.features.select { |f| driver.class.has_feature?(c.collection_name, f.name) }.each do |f|
-        %feature{ :name => f.name }
-          - driver.class.constraints(:collection => c.collection_name, :feature => f.name).each do |name, value|
-            %constraint{ :name => name }=value
+        - f.operations.each do |operation|
+          %feature{ :name => f.name, :rel => operation.name }
+            - operation.params_array.each do |param|
+              %param{ :name => param.name}
+            - driver.class.constraints(:collection => c.collection_name, :feature => f.name).each do |name, value|
+              %constraint{ :name => name }=value