deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core] DigitalOcean: Fix filtering of realms (DTACLOUD-503)
Date Thu, 07 Mar 2013 13:52:50 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/deltacloud/drivers/digitalocean/digitalocean_driver.rb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/server/lib/deltacloud/drivers/digitalocean/digitalocean_driver.rb b/server/lib/deltacloud/drivers/digitalocean/digitalocean_driver.rb
index ad5faf8..c9e3dc3 100644
--- a/server/lib/deltacloud/drivers/digitalocean/digitalocean_driver.rb
+++ b/server/lib/deltacloud/drivers/digitalocean/digitalocean_driver.rb
@@ -65,16 +65,19 @@ module Deltacloud
           hwps
         end
 
+        require 'pry'
+
         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
 
-- 
1.8.1.4


Mime
View raw message