Sha256: 07da80acdb175091db1043f9629c05fe13d4dee457dffcc2e2b60af8cc6bc743

Contents?: true

Size: 1.14 KB

Versions: 39

Compression:

Stored size: 1.14 KB

Contents

module Fog
  module DNS
    class Bluebox
      class Real
        require '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

39 entries across 37 versions & 5 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-1.42.1/lib/fog/bluebox/requests/dns/get_record.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-1.42.1/lib/fog/bluebox/requests/dns/get_record.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-1.42.1/lib/fog/bluebox/requests/dns/get_record.rb
fog-1.42.1 lib/fog/bluebox/requests/dns/get_record.rb
fog-2.0.0 lib/fog/bluebox/requests/dns/get_record.rb
fog-1.42.0 lib/fog/bluebox/requests/dns/get_record.rb
fog-1.41.0 lib/fog/bluebox/requests/dns/get_record.rb
fog-1.40.0 lib/fog/bluebox/requests/dns/get_record.rb
fog-1.39.0 lib/fog/bluebox/requests/dns/get_record.rb
fog-1.38.0 lib/fog/bluebox/requests/dns/get_record.rb
fog-1.37.0 lib/fog/bluebox/requests/dns/get_record.rb
fog-1.36.0 lib/fog/bluebox/requests/dns/get_record.rb
fog-1.35.0 lib/fog/bluebox/requests/dns/get_record.rb
fog-2.0.0.pre.0 lib/fog/bluebox/requests/dns/get_record.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/bluebox/requests/dns/get_record.rb
fog-1.34.0 lib/fog/bluebox/requests/dns/get_record.rb
fog-1.33.0 lib/fog/bluebox/requests/dns/get_record.rb
fog-1.32.0 lib/fog/bluebox/requests/dns/get_record.rb
fog-1.31.0 lib/fog/bluebox/requests/dns/get_record.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/bluebox/requests/dns/get_record.rb