deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [2/2] git commit: Fix run_on_instance code to grab IP address correctly
Date Fri, 18 May 2012 15:58:49 GMT
Fix run_on_instance code to grab IP address correctly

>From JIRA DTACLOUD_211 - thanks to Dies Koper diesk@fast.au.fujitsu.com

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


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

Branch: refs/heads/master
Commit: 1bb1e32b6e660b62e330a9dba9c2887636aaf5c8
Parents: 7bc7e8a
Author: marios <marios@redhat.com>
Authored: Fri May 18 18:56:06 2012 +0300
Committer: marios <marios@redhat.com>
Committed: Fri May 18 18:56:06 2012 +0300

----------------------------------------------------------------------
 server/lib/deltacloud/drivers/ec2/ec2_driver.rb    |    2 +-
 .../lib/deltacloud/drivers/gogrid/gogrid_driver.rb |    2 +-
 .../drivers/rackspace/rackspace_driver.rb          |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/1bb1e32b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
index 808b2b2..2ebb6c2 100644
--- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
+++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
@@ -261,7 +261,7 @@ module Deltacloud
             :username => 'root', # Default for EC2 Linux instances
           }
           param[:port] = opts[:port] || '22'
-          param[:ip] = target.public_addresses
+          param[:ip] = target.public_addresses.first.address
           param[:private_key] = (opts[:private_key].length > 1) ? opts[:private_key] :
nil
           safely do
             Deltacloud::Runner.execute(opts[:cmd], param)

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/1bb1e32b/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb b/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb
index 285f58f..c6336cd 100644
--- a/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb
+++ b/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb
@@ -148,7 +148,7 @@ class GogridDriver < Deltacloud::BaseDriver
     }
     param[:credentials].merge!({ :password => opts[:password]}) if opts[:password].length>0
     param[:port] = opts[:port] || '22'
-    param[:ip] = target.public_addresses
+    param[:ip] = target.public_addresses.first.address
     Deltacloud::Runner.execute(opts[:cmd], param)
   end
 

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/1bb1e32b/server/lib/deltacloud/drivers/rackspace/rackspace_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/rackspace/rackspace_driver.rb b/server/lib/deltacloud/drivers/rackspace/rackspace_driver.rb
index 1b019d4..a578180 100644
--- a/server/lib/deltacloud/drivers/rackspace/rackspace_driver.rb
+++ b/server/lib/deltacloud/drivers/rackspace/rackspace_driver.rb
@@ -128,7 +128,7 @@ class RackspaceDriver < Deltacloud::BaseDriver
       :password => opts[:password]
     }
     param[:port] = opts[:port] || '22'
-    param[:ip] = target.public_addresses.first
+    param[:ip] = target.public_addresses.first.address
     safely do
       Deltacloud::Runner.execute(opts[:cmd], param)
     end


Mime
View raw message