2010-12-12 18:02:02 -05:00
|
|
|
module Fog
|
2011-06-21 16:03:33 -04:00
|
|
|
module DNS
|
|
|
|
class Zerigo
|
2010-12-12 18:02:02 -05:00
|
|
|
class Real
|
|
|
|
|
2011-01-07 19:12:04 -05:00
|
|
|
require 'fog/dns/parsers/zerigo/list_hosts'
|
2010-12-12 18:02:02 -05:00
|
|
|
|
|
|
|
# Get list of all DNS zones hosted on Slicehost (for this account)
|
|
|
|
#
|
2010-12-12 21:18:21 -05:00
|
|
|
# ==== Parameters
|
|
|
|
# * zone_id<~Integer> - the zone ID of the zone from which to get the host records for
|
2010-12-12 18:02:02 -05:00
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
2010-12-12 21:18:21 -05:00
|
|
|
# * body<~Hash>:
|
2010-12-13 08:51:04 -05:00
|
|
|
# * 'hosts'<~Array>
|
2010-12-12 21:18:21 -05:00
|
|
|
# * 'created-at'<~String>
|
|
|
|
# * 'data'<~String>
|
|
|
|
# * 'fqdn'<~String>
|
|
|
|
# * 'host-type'<~String>
|
|
|
|
# * 'hostname'<~String>
|
|
|
|
# * 'id'<~Integer>
|
|
|
|
# * 'notes'<~String>
|
|
|
|
# * 'priority'<~Integer>
|
|
|
|
# * 'ttl'<~Integer>
|
|
|
|
# * 'updated-at'<~String>
|
|
|
|
# * 'zone-id'<~String>
|
2010-12-13 08:51:04 -05:00
|
|
|
# * 'status'<~Integer> - 200 indicates success
|
2010-12-12 18:02:02 -05:00
|
|
|
def list_hosts( zone_id)
|
|
|
|
request(
|
|
|
|
:expects => 200,
|
|
|
|
:method => 'GET',
|
2010-12-21 16:45:53 -05:00
|
|
|
:parser => Fog::Parsers::Zerigo::DNS::ListHosts.new,
|
2010-12-12 18:02:02 -05:00
|
|
|
:path => "/api/1.1/zones/#{zone_id}/hosts.xml"
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|