You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by mf...@redhat.com on 2010/08/27 14:55:32 UTC

[PATCH core 4/5] Fixed helper to support checking features of other collections than instances

---
 .../lib/deltacloud/helpers/application_helper.rb   |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/lib/deltacloud/helpers/application_helper.rb b/server/lib/deltacloud/helpers/application_helper.rb
index 8b525ff..26c0a7b 100644
--- a/server/lib/deltacloud/helpers/application_helper.rb
+++ b/server/lib/deltacloud/helpers/application_helper.rb
@@ -41,8 +41,8 @@ module ApplicationHelper
     collections[:instances].operations[action.to_sym].method
   end
 
-  def driver_has_feature?(feature_name)
-    not driver.features(:instances).select{ |f| f.name.eql?(feature_name) }.empty?
+  def driver_has_feature?(feature_name, collection=:instances)
+    not driver.features(collection).select{ |f| f.name.eql?(feature_name) }.empty?
   end
 
   def driver_has_auth_features?
-- 
1.7.2.2