2010-10-28 20:50:46 -04:00
|
|
|
module Fog
|
|
|
|
module Parsers
|
|
|
|
module AWS
|
|
|
|
module IAM
|
|
|
|
|
|
|
|
class ListGroups < Fog::Parsers::Base
|
|
|
|
|
|
|
|
def reset
|
|
|
|
@group = {}
|
|
|
|
@response = { 'Groups' => [] }
|
|
|
|
end
|
|
|
|
|
|
|
|
def end_element(name)
|
|
|
|
case name
|
|
|
|
when 'Arn', 'GroupId', 'GroupName', 'Path'
|
2011-05-12 16:15:13 -04:00
|
|
|
@group[name] = value
|
2010-10-28 20:50:46 -04:00
|
|
|
when 'member'
|
|
|
|
@response['Groups'] << @group
|
|
|
|
@group = {}
|
|
|
|
when 'IsTruncated'
|
2011-05-12 16:15:13 -04:00
|
|
|
response[name] = (value == 'true')
|
2010-11-09 20:47:35 -05:00
|
|
|
when 'Marker', 'RequestId'
|
2011-05-12 16:15:13 -04:00
|
|
|
response[name] = value
|
2010-10-28 20:50:46 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|