Sha256: 434e79112455be2348920654c2ed27b71bec20e497a59bc49fc91c0e63e35c73

Contents?: true

Size: 889 Bytes

Versions: 7

Compression:

Stored size: 889 Bytes

Contents

module Fog
  module Zerigo
    class DNS
      class Real

        require 'fog/dns/parsers/zerigo/count_hosts'

        # 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
        #
        # ==== Returns
        # * response<~Excon::Response>: 
        #   * body<~Hash>
        #     * 'count'<~Integer> 
        #   * 'status'<~Integer> - 200 indicates success
        def count_hosts( zone_id)
          request(
            :expects  => 200,
            :method   => 'GET',
            :parser   => Fog::Parsers::Zerigo::DNS::CountHosts.new,
            :path     => "/api/1.1/zones/#{zone_id}/hosts/count.xml"
          )
        end

      end

      class Mock

        def count_hosts( zone_id)
          Fog::Mock.not_implemented
        end

      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
fog-0.5.1 lib/fog/dns/requests/zerigo/count_hosts.rb
fog-0.5.0 lib/fog/dns/requests/zerigo/count_hosts.rb
phpfog-fog-0.4.1.3 lib/fog/dns/requests/zerigo/count_hosts.rb
phpfog-fog-0.4.1.2 lib/fog/dns/requests/zerigo/count_hosts.rb
phpfog-fog-0.4.1.1 lib/fog/dns/requests/zerigo/count_hosts.rb
phpfog-fog-0.4.1 lib/fog/dns/requests/zerigo/count_hosts.rb
fog-0.4.1 lib/fog/dns/requests/zerigo/count_hosts.rb