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/slicehost/parsers/compute/get_zones.rb
Athir Nuaimi 5b50f8b2a8 slicehost.get_zones fully working
debugged issues with get_zones. still no test cases though.  once get rest of DNS functions working will contact geemus and find out more about how to add test cases
2010-12-09 13:20:44 -05:00

30 lines
573 B
Ruby

module Fog
module Parsers
module Slicehost
module Compute
class GetZones < Fog::Parsers::Base
def reset
@zone = {}
@response = { 'zones' => [] }
end
def end_element(name)
case name
when 'ttl', 'id'
@zone[name] = @value.to_i
when 'active', 'origin'
@zone[name] = @value
when 'zone'
@response['zones'] << @zone
@zone = {}
end
end
end
end
end
end
end