deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject git commit: [Core] Deltacloud openstack driver 1.8.7 compatibility issue DTACLOUD-461
Date Tue, 12 Feb 2013 10:29:05 GMT
Updated Branches:
  refs/heads/master 5e74925f4 -> fdbdb7cde


[Core] Deltacloud openstack driver 1.8.7 compatibility issue DTACLOUD-461

https://issues.apache.org/jira/browse/DTACLOUD-461


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

Branch: refs/heads/master
Commit: fdbdb7cde983746c40f3be3432c8aa328e022ffa
Parents: 5e74925
Author: marios <marios@redhat.com>
Authored: Mon Feb 11 18:49:25 2013 +0200
Committer: marios <marios@redhat.com>
Committed: Tue Feb 12 12:27:56 2013 +0200

----------------------------------------------------------------------
 .../drivers/openstack/openstack_driver.rb          |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/fdbdb7cd/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/openstack/openstack_driver.rb b/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
index bd541bc..bb4210b 100644
--- a/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
+++ b/server/lib/deltacloud/drivers/openstack/openstack_driver.rb
@@ -46,8 +46,8 @@ module Deltacloud
         def supported_collections(credentials)
           #get the collections as defined by 'capability' and 'respond_to?' blocks
           super_collections = super
-          super_collections = super_collections - [Sinatra::Rabbit::BucketsCollection] if
regions_for("object-store", credentials).empty?
-          super_collections = super_collections - [Sinatra::Rabbit::StorageVolumesCollection]
if regions_for("volume", credentials).empty?
+          super_collections = super_collections - [Sinatra::Rabbit::BucketsCollection] if
regions_for(credentials, "object-store").empty?
+          super_collections = super_collections - [Sinatra::Rabbit::StorageVolumesCollection]
if regions_for(credentials, "volume").empty?
           super_collections
         end
 
@@ -182,7 +182,7 @@ module Deltacloud
             os = new_client( credentials, "compute", opts[:realm_id])
           else
             #choose a random realm:
-            available_realms = regions_for("compute", credentials)
+            available_realms = regions_for(credentials, "compute")
             os = new_client(credentials, "compute", available_realms.sample.id)
           end
           result = nil
@@ -489,7 +489,7 @@ private
           api_provider.split(";").last
         end
 
-        def regions_for(service="compute", credentials)
+        def regions_for(credentials, service="compute")
           realms(credentials).select{|region| region.resource_types.include?(service)}
         end
 


Mime
View raw message