deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core] Core: Expand API features in entrypoint
Date Mon, 08 Oct 2012 14:23:52 GMT
From: Michal Fojtik <mfojtik@redhat.com>

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

Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/views/api/show.xml.haml |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

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
-- 
1.7.10.2


Mime
View raw message