2009-07-13 12:58:08 -04:00
|
|
|
module Fog
|
|
|
|
module Parsers
|
|
|
|
module AWS
|
2010-09-08 17:40:02 -04:00
|
|
|
module Compute
|
2009-07-13 12:58:08 -04:00
|
|
|
|
|
|
|
class DescribeAvailabilityZones < Fog::Parsers::Base
|
|
|
|
|
|
|
|
def reset
|
2009-08-01 04:15:44 -04:00
|
|
|
@availability_zone = {}
|
|
|
|
@response = { 'availabilityZoneInfo' => [] }
|
2009-07-13 12:58:08 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def end_element(name)
|
|
|
|
case name
|
|
|
|
when 'item'
|
2009-08-01 04:15:44 -04:00
|
|
|
@response['availabilityZoneInfo'] << @availability_zone
|
|
|
|
@availability_zone = {}
|
|
|
|
when 'regionName', 'zoneName', 'zoneState'
|
|
|
|
@availability_zone[name] = @value
|
2009-07-13 12:58:08 -04:00
|
|
|
when 'requestId'
|
2009-08-01 04:15:44 -04:00
|
|
|
@response[name] = @value
|
2009-07-13 12:58:08 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2010-09-08 17:40:02 -04:00
|
|
|
end
|