Sha256: 02a202d0f3b575fd2dfc2efb91f48e850828d36049f2bb4042abad540557b6db

Contents?: true

Size: 1.17 KB

Versions: 3

Compression:

Stored size: 1.17 KB

Contents

module Fog
  module DNS
    class Zerigo
      class Real

        require 'fog/zerigo/parsers/dns/list_hosts'

        # Get list of all DNS zones hosted on Slicehost (for this account)
        #
        # ==== Parameters
        # * zone_id<~Integer> - the zone ID of the zone from which to get the host records for
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'hosts'<~Array>
        #       * '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>
        # * 'status'<~Integer> - 200 indicates success
        def list_hosts( zone_id)
          request(
            :expects  => 200,
            :method   => 'GET',
            :parser   => Fog::Parsers::DNS::Zerigo::ListHosts.new,
            :path     => "/api/1.1/zones/#{zone_id}/hosts.xml"
          )
        end

      end
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
brightbox-cli-0.14.1 lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/list_hosts.rb
brightbox-cli-0.14.0 lib/brightbox-cli/vendor/fog/lib/fog/zerigo/requests/dns/list_hosts.rb
fog-1.0.0 lib/fog/zerigo/requests/dns/list_hosts.rb