2010-12-12 18:02:02 -05:00
|
|
|
module Fog
|
|
|
|
module Zerigo
|
2010-12-21 16:45:53 -05:00
|
|
|
class DNS
|
2010-12-12 18:02:02 -05:00
|
|
|
class Real
|
|
|
|
|
2011-01-07 19:12:04 -05:00
|
|
|
require 'fog/dns/parsers/zerigo/count_hosts'
|
2010-12-12 18:02:02 -05:00
|
|
|
|
2010-12-12 21:18:21 -05:00
|
|
|
# total number of hosts available for the specified zone. It is the same value as provided
|
|
|
|
# in the X-Query-Count header in the list_hosts API method
|
2010-12-12 18:02:02 -05:00
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
2010-12-13 08:51:04 -05:00
|
|
|
# * body<~Hash>
|
|
|
|
# * 'count'<~Integer>
|
|
|
|
# * 'status'<~Integer> - 200 indicates success
|
2010-12-12 18:02:02 -05:00
|
|
|
def count_hosts( zone_id)
|
|
|
|
request(
|
|
|
|
:expects => 200,
|
|
|
|
:method => 'GET',
|
2010-12-21 16:45:53 -05:00
|
|
|
:parser => Fog::Parsers::Zerigo::DNS::CountHosts.new,
|
2010-12-12 18:02:02 -05:00
|
|
|
:path => "/api/1.1/zones/#{zone_id}/hosts/count.xml"
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|