[
https://issues.apache.org/jira/browse/DTACLOUD-421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13556198#comment-13556198
]
Christian Karnath commented on DTACLOUD-421:
--------------------------------------------
The problem is that the authentication keyname-string in the json output gets
overwritten with the 'username' attribute when 'keyname' and 'username' are
both present.
deltacloud/server/lib/deltacloud/models/instance.rb:
[...]
78 if context.driver.class.has_feature?(:instances, :authentication_key)
79 r.merge!(:authentication_type => 'key' )
80 r.merge!(:authentication => { :keyname => keyname }) if keyname
81 end
82 if context.driver.class.has_feature?(:instances,
:authentication_password)
83 r.merge!(:authentication_type => 'password' )
84 r.merge!(:authentication => { :user => username, :password => password
}) if username
85 end
[...]
Adding the following constraint to line 84 fixed the problem:
r.merge!(:authentication => { :user => username, :password => password }) if
username and !keyname
P.S.: This code already includes the following fix (username typo):
http://tracker.deltacloud.org/set/256
> Missing keyname-attribute in JSON output against openstack
> ----------------------------------------------------------
>
> Key: DTACLOUD-421
> URL: https://issues.apache.org/jira/browse/DTACLOUD-421
> Project: DeltaCloud
> Issue Type: Bug
> Components: Server
> Environment: Debian 6.0.6, ruby 1.9.2p0, deltacloud development
> Reporter: Christian Karnath
>
> The 'keyname' attribute is missing in JSON output when requesting all
> instances or a single instance against openstack
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira