2012-06-23 14:58:19 -04:00
|
|
|
module Fog
|
|
|
|
module Rackspace
|
|
|
|
class Identity
|
|
|
|
class Real
|
|
|
|
def list_credentials(user_id)
|
2012-06-25 19:08:25 -04:00
|
|
|
response = request(
|
2012-06-23 14:58:19 -04:00
|
|
|
:expects => [200, 203],
|
|
|
|
:method => 'GET',
|
|
|
|
:path => "users/#{user_id}/OS-KSADM/credentials"
|
|
|
|
)
|
2012-06-25 19:08:25 -04:00
|
|
|
|
2012-06-27 11:15:16 -04:00
|
|
|
unless response.body['credentials'].is_a?(Array)
|
2012-06-25 19:08:25 -04:00
|
|
|
response.body['credentials'] = [response.body['credential']]
|
|
|
|
response.body.delete('credential')
|
|
|
|
end
|
|
|
|
|
|
|
|
response
|
2012-06-23 14:58:19 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|