1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/aws/parsers/ec2/describe_availability_zones.rb
2009-07-13 09:58:08 -07:00

34 lines
No EOL
759 B
Ruby

module Fog
module Parsers
module AWS
module EC2
class DescribeAvailabilityZones < Fog::Parsers::Base
def reset
@zone = {}
@response = { :availability_zone_info => [] }
end
def end_element(name)
case name
when 'item'
@response[:availability_zone_info] << @zone
@zone = {}
when 'regionName'
@zone[:region_name] = @value
when 'requestId'
@response[:request_id] = @value
when 'zoneName'
@zone[:zone_name] = @value
when 'zoneState'
@zone[:zone_state] = @value
end
end
end
end
end
end
end