mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
34 lines
No EOL
759 B
Ruby
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 |