deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [2/4] git commit: DigitalOcean: Fix filtering of realms (DTACLOUD-503)
Date Tue, 12 Mar 2013 17:31:20 GMT
DigitalOcean: Fix filtering of realms (DTACLOUD-503)


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

Branch: refs/heads/master
Commit: d399b0a976dac31cc867377045784a7c6dce163c
Parents: 4cf2040
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Thu Mar 7 14:52:12 2013 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Tue Mar 12 11:25:35 2013 +0100

----------------------------------------------------------------------
 .../drivers/digitalocean/digitalocean_driver.rb    |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/d399b0a9/server/lib/deltacloud/drivers/digitalocean/digitalocean_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/digitalocean/digitalocean_driver.rb b/server/lib/deltacloud/drivers/digitalocean/digitalocean_driver.rb
index ad5faf8..2a202cc 100644
--- a/server/lib/deltacloud/drivers/digitalocean/digitalocean_driver.rb
+++ b/server/lib/deltacloud/drivers/digitalocean/digitalocean_driver.rb
@@ -67,14 +67,15 @@ module Deltacloud
 
         def realms(credentials, opts={})
           safely do
-            new_client(credentials).get('regions')['regions'].map do |r|
+            realms = new_client(credentials).get('regions')['regions'].map do |r|
               Realm.new(
-                :id => r['id'],
+                :id => r['id'].to_s,
                 :name => r['name'],
                 :state => 'AVAILABLE',
                 :limit => :unlimited
               )
             end
+            filter_on(realms, opts, :id)
           end
         end
 


Mime
View raw message