deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 04/16] Core: The 'supported_collections' helper now return correct array
Date Thu, 19 Jul 2012 13:02:37 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/deltacloud/helpers/deltacloud_helper.rb |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/server/lib/deltacloud/helpers/deltacloud_helper.rb b/server/lib/deltacloud/helpers/deltacloud_helper.rb
index cec22ac..047e1b2 100644
--- a/server/lib/deltacloud/helpers/deltacloud_helper.rb
+++ b/server/lib/deltacloud/helpers/deltacloud_helper.rb
@@ -19,6 +19,7 @@ module Deltacloud::Helpers
     require 'benchmark'
 
     def supported_collections
+      collection_arr = []
       Deltacloud::Collections.deltacloud_modules.each do |m|
         m.collections.each do |c|
           # Get the required capability for the :index operation (like 'realms' or 'instance_state_machine')
@@ -27,8 +28,10 @@ module Deltacloud::Helpers
           # for the Sinatra::Base class evaluate to 'true'
           next if m.settings.respond_to?(:capability) and !m.settings.capability(index_operation_capability)
           yield c if block_given?
+          collection_arr << c
         end
       end
+      collection_arr
     end
 
     def auth_feature_name
-- 
1.7.10.2


Mime
View raw message