Sha256: 5ecb93b93d0959245ec1bb00835e9dd231901fa8396cdcf5896825876ec91ce4

Contents?: true

Size: 1.18 KB

Versions: 7

Compression:

Stored size: 1.18 KB

Contents

module Fog
  module Slicehost
    class DNS
      class Real

        require 'fog/dns/parsers/slicehost/get_record'

        # Get an individual DNS record from the specified zone 
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'record_type'<~String> - type of DNS record to create (A, CNAME, etc)
        #     * 'zone_id'<~Integer> - ID of the zone to update
        #     * 'name'<~String> - host name this DNS record is for 
        #     * 'data'<~String> - data for the DNS record (ie for an A record, the IP address)
        #     * 'ttl'<~Integer> - time to live in seconds
        #     * 'active'<~String> - whether this record is active or not ('Y' or 'N')
        #     * 'aux'<~String> - extra data required by the record
        def get_record(record_id)
          request(
            :expects  => 200,
            :method   => 'GET',
            :parser   => Fog::Parsers::Slicehost::DNS::GetRecords.new,
            :path     => "records/#{record_id}.xml"
          )
        end

      end

      class Mock

        def get_record(record_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/slicehost/get_record.rb
fog-0.5.0 lib/fog/dns/requests/slicehost/get_record.rb
phpfog-fog-0.4.1.3 lib/fog/dns/requests/slicehost/get_record.rb
phpfog-fog-0.4.1.2 lib/fog/dns/requests/slicehost/get_record.rb
phpfog-fog-0.4.1.1 lib/fog/dns/requests/slicehost/get_record.rb
phpfog-fog-0.4.1 lib/fog/dns/requests/slicehost/get_record.rb
fog-0.4.1 lib/fog/dns/requests/slicehost/get_record.rb