Sha256: 70e97a688a81155be6e198f4fcf0fe8839e085680432bcb5f29c7433fcdbf712

Contents?: true

Size: 1.15 KB

Versions: 1

Compression:

Stored size: 1.15 KB

Contents

module Fog
  module DNS
    class Bluebox
      class Real

        require 'rackspace-fog/bluebox/parsers/dns/get_record'

        # Get an individual DNS record from the specified zone
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * hash<~Hash>:
        #     * 'id'<~String> - The id of this record
        #     * 'type'<~String> - type of DNS record to create (A, CNAME, etc)
        #     * 'domain-id'<~Integer> - ID of the zone
        #     * 'name'<~String> - empty?
        #     * 'domain'<~String> - The domain name
        #     * 'type'<~String> - The type of DNS record (e.g. A, MX, NS, etc.)
        #     * 'content'<~String> - data for the DNS record (ie for an A record, the IP address)
        def get_record(zone_id, record_id)
          request(
            :expects  => 200,
            :method   => 'GET',
            :parser   => Fog::Parsers::DNS::Bluebox::GetRecord.new,
            :path     => "/api/domains/#{zone_id}/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

1 entries across 1 versions & 1 rubygems

Version Path
rackspace-fog-1.4.2 lib/rackspace-fog/bluebox/requests/dns/get_record.rb