2010-11-17 13:29:58 -05:00
|
|
|
module Fog
|
|
|
|
module Parsers
|
|
|
|
module AWS
|
|
|
|
module IAM
|
|
|
|
|
|
|
|
class ListUsers < Fog::Parsers::Base
|
|
|
|
|
|
|
|
def reset
|
|
|
|
@user = {}
|
|
|
|
@response = { 'Users' => [] }
|
|
|
|
end
|
|
|
|
|
|
|
|
def end_element(name)
|
|
|
|
case name
|
|
|
|
when 'Arn', 'UserId', 'UserName', 'Path'
|
2011-05-12 16:15:13 -04:00
|
|
|
@user[name] = value
|
2010-11-17 13:29:58 -05:00
|
|
|
when 'member'
|
|
|
|
@response['Users'] << @user
|
|
|
|
@user = {}
|
|
|
|
when 'IsTruncated'
|
2011-05-12 16:15:13 -04:00
|
|
|
response[name] = (value == 'true')
|
2010-11-17 13:29:58 -05:00
|
|
|
when 'Marker', 'RequestId'
|
2011-05-12 16:15:13 -04:00
|
|
|
response[name] = value
|
2010-11-17 13:29:58 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|