From: marios <mar...@redhat.com> 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 Signed-off-by: marios <mar...@redhat.com> --- server/lib/deltacloud/models/instance.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 1.7.11.7