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/compute/parsers/terremark_ecloud/get_ip_addresses.rb

27 lines
593 B
Ruby

module Fog
module Parsers
module TerremarkEcloud
module Compute
class GetIpAddresses < Fog::Parsers::Base
def reset
@response = { 'IpAddresses' => [] }
@ip_address = {}
end
def end_element(name)
case name
when 'Id', 'Href', 'Name', 'RnatAddress', 'Server', 'Status'
@ip_address[name] = @value
when 'IpAddress'
@response['IpAddresses'] << @ip_address
@ip_address = {}
end
end
end
end
end
end
end