deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject git commit: Deltacloud - adds EC2 driver import key functionality - DTACLOUD-438 (+updated gemspec for aws 2.7.0 required here)
Date Thu, 07 Feb 2013 16:02:59 GMT
Updated Branches:
  refs/heads/master 3d318d252 -> 5a38b15d5


Deltacloud - adds EC2 driver import key functionality - DTACLOUD-438
(+updated gemspec for aws 2.7.0 required here)

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


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

Branch: refs/heads/master
Commit: 5a38b15d561fb0d55afc5b097aee8cab0bb3a377
Parents: 3d318d2
Author: marios <marios@redhat.com>
Authored: Thu Feb 7 17:37:50 2013 +0200
Committer: marios <marios@redhat.com>
Committed: Thu Feb 7 18:01:02 2013 +0200

----------------------------------------------------------------------
 server/deltacloud-core.gemspec                  |    2 +-
 server/lib/deltacloud/drivers/ec2/ec2_driver.rb |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/5a38b15d/server/deltacloud-core.gemspec
----------------------------------------------------------------------
diff --git a/server/deltacloud-core.gemspec b/server/deltacloud-core.gemspec
index 0555c21..ad16f0c 100644
--- a/server/deltacloud-core.gemspec
+++ b/server/deltacloud-core.gemspec
@@ -92,7 +92,7 @@ Gem::Specification.new do |s|
   s.add_dependency('rbovirt', '>=0.0.16')
 
   # Amazon EC2 S3
-  s.add_dependency('aws', '>=2.6.0')
+  s.add_dependency('aws', '>=2.7.0')
   # Microsoft Azure
   s.add_dependency('waz-storage', '>=1.1.0')
 

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/5a38b15d/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 cd048c9..64f827c 100644
--- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
+++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
@@ -380,7 +380,11 @@ module Deltacloud
         def create_key(credentials, opts={})
           ec2 = new_client(credentials)
           safely do
-            convert_key(ec2.create_key_pair(opts[:key_name]))
+            if (opts[:public_key] && opts[:public_key].length >0)
+              convert_key(ec2.import_key_pair(opts[:key_name], opts[:public_key]))
+            else
+              convert_key(ec2.create_key_pair(opts[:key_name]))
+            end
           end
         end
 


Mime
View raw message