2010-12-11 20:01:33 -05:00
|
|
|
module Fog
|
|
|
|
module Parsers
|
|
|
|
module Zerigo
|
2010-12-21 16:45:53 -05:00
|
|
|
module DNS
|
2010-12-11 20:01:33 -05:00
|
|
|
|
|
|
|
class ListZones < Fog::Parsers::Base
|
|
|
|
|
|
|
|
def reset
|
|
|
|
@zone = {}
|
|
|
|
@response = { 'zones' => [] }
|
|
|
|
end
|
|
|
|
|
|
|
|
def end_element(name)
|
|
|
|
case name
|
2010-12-12 18:02:02 -05:00
|
|
|
when 'default-ttl', 'id', 'nx-ttl', 'hosts-count'
|
2010-12-11 20:01:33 -05:00
|
|
|
@zone[name] = @value.to_i
|
2010-12-12 18:02:02 -05:00
|
|
|
when 'created-at', 'custom-nameservers', 'custom-ns', 'domain', 'hostmaster', 'notes', 'ns1', 'ns-type', 'slave-nameservers', 'tag-list', 'updated-at', 'hosts', 'axfr-ips', 'restrict-axfr'
|
2010-12-11 20:01:33 -05:00
|
|
|
@zone[name] = @value
|
|
|
|
when 'zone'
|
|
|
|
@response['zones'] << @zone
|
|
|
|
@zone = {}
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|