deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject git commit: Fix for DTACLOUD-421 JSON output against openstack
Date Wed, 23 Jan 2013 16:50:12 GMT
Updated Branches:
  refs/heads/master 6899884ec -> 2ac6243e7


Fix for DTACLOUD-421 JSON output against openstack

Makes sure we retain keyname when both authentication_password and
authentication_key are present in driver (openstack in this case)

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


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

Branch: refs/heads/master
Commit: 2ac6243e7a7c1ea4a106af07ba30b89fccdfb6d4
Parents: 6899884
Author: marios <marios@redhat.com>
Authored: Tue Jan 22 11:32:33 2013 +0200
Committer: marios <marios@redhat.com>
Committed: Wed Jan 23 18:49:41 2013 +0200

----------------------------------------------------------------------
 server/lib/deltacloud/models/instance.rb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/2ac6243e/server/lib/deltacloud/models/instance.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/models/instance.rb b/server/lib/deltacloud/models/instance.rb
index 8396529..0fd6b13 100644
--- a/server/lib/deltacloud/models/instance.rb
+++ b/server/lib/deltacloud/models/instance.rb
@@ -72,7 +72,8 @@ class Instance < BaseModel
       r.merge!(:authentication => { :keyname => keyname }) if keyname
     end
     if context.driver.class.has_feature?(:instances, :authentication_password)
-      r.merge!(:authentication => { :user => username, :password => password })
if username
+      r[:authentication] && username ? r[:authentication].merge!({ :user => username,
:password => password }) :
+              (username ? r.merge!(:authentication => { :user => username, :password
=> password }) : nil)
     end
     r
   end


Mime
View raw message