Sha256: bf8ce477a2aa7b4c313f4b0d6b351973fc63a42cb9c5e018819c75dec9ba8be6

Contents?: true

Size: 1.28 KB

Versions: 7

Compression:

Stored size: 1.28 KB

Contents

module Fog
  module Zerigo
    class DNS
      class Real

        require 'fog/dns/parsers/zerigo/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::Zerigo::DNS::ListHosts.new,
            :path     => "/api/1.1/zones/#{zone_id}/hosts.xml"
          )
        end

      end

      class Mock

        def list_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/list_hosts.rb
fog-0.5.0 lib/fog/dns/requests/zerigo/list_hosts.rb
phpfog-fog-0.4.1.3 lib/fog/dns/requests/zerigo/list_hosts.rb
phpfog-fog-0.4.1.2 lib/fog/dns/requests/zerigo/list_hosts.rb
phpfog-fog-0.4.1.1 lib/fog/dns/requests/zerigo/list_hosts.rb
phpfog-fog-0.4.1 lib/fog/dns/requests/zerigo/list_hosts.rb
fog-0.4.1 lib/fog/dns/requests/zerigo/list_hosts.rb