incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject svn commit: r962323 - /incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
Date Thu, 08 Jul 2010 23:46:17 GMT
Author: lutter
Date: Thu Jul  8 23:46:17 2010
New Revision: 962323

URL: http://svn.apache.org/viewvc?rev=962323&view=rev
Log:
Added DCLOUD_EC2_URL variable for EC2 driver

Modified:
    incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb?rev=962323&r1=962322&r2=962323&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/drivers/ec2/ec2_driver.rb Thu Jul  8
23:46:17 2010
@@ -254,10 +254,12 @@ class EC2Driver < Deltacloud::BaseDriver
   private
 
   def new_client(credentials)
-    AWS::EC2::Base.new(
+    opts = {
       :access_key_id => credentials.user,
       :secret_access_key => credentials.password
-    )
+    }
+    opts[:server] = ENV['DCLOUD_EC2_URL'] if ENV['DCLOUD_EC2_URL']
+    AWS::EC2::Base.new(opts)
   end
 
   def convert_image(ec2_image)



Mime
View raw message