2010-12-12 18:02:02 -05:00
|
|
|
module Fog
|
|
|
|
module Parsers
|
2011-06-15 20:25:01 -04:00
|
|
|
module DNS
|
|
|
|
module Zerigo
|
2010-12-12 18:02:02 -05:00
|
|
|
|
|
|
|
class GetHost < Fog::Parsers::Base
|
|
|
|
|
|
|
|
def reset
|
2010-12-12 21:18:21 -05:00
|
|
|
@response = {}
|
2010-12-12 18:02:02 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def end_element(name)
|
|
|
|
case name
|
2012-02-10 11:21:34 -05:00
|
|
|
when 'id', 'zone-id'
|
2011-05-12 16:15:13 -04:00
|
|
|
@response[name] = value.to_i
|
2012-02-10 11:21:34 -05:00
|
|
|
when 'priority', 'ttl'
|
|
|
|
@response[name] = value.to_i if value
|
2010-12-12 18:02:02 -05:00
|
|
|
when 'data', 'fqdn', 'host-type', 'hostname', 'notes', 'zone-id', 'created-at', 'updated-at'
|
2011-05-12 16:15:13 -04:00
|
|
|
@response[name] = value
|
2010-12-12 18:02:02 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|