Sha256: bfa7e2b8834f7b41c8c2503f9ddac85d74eca071548ec4aebce332951992e9d4

Contents?: true

Size: 1.55 KB

Versions: 37

Compression:

Stored size: 1.55 KB

Contents

module Fog
  module HP
    class DNS
      class Real

        # Get details of an existing DNS record
        #
        # ==== Parameters
        # * 'domain_id'<~String> - UUId of domain for record
        # * 'record_id'<~String> - UUId of record to get
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * 'id'<~String> - UUID of the record
        #     * 'name'<~String> - Name of the record
        #     * 'description'<~String> - Description for the record
        #     * 'type'<~String> - Type of the record
        #     * 'domain_id'<~String> - UUId of the domain
        #     * 'ttl'<~Integer> - TTL of the record
        #     * 'data'<~String> - Data required by the record
        #     * 'priority'<~Integer> - Priority for the record
        #     * 'created_at'<~String> - created date time stamp
        #     * 'updated_at'<~String> - updated date time stamp
        def get_record(domain_id, record_id)
          request(
              :expects => 200,
              :method  => 'GET',
              :path    => "domains/#{domain_id}/records/#{record_id}"
          )
        end
      end
      class Mock
        def get_record(domain_id, record_id)
          response = Excon::Response.new
          if record = list_records_in_a_domain(domain_id).body['records'].detect { |_| _['id'] == record_id }
            response.status = 200
            response.body = record
            response
          else
            raise Fog::HP::DNS::NotFound
          end
        end
      end
    end
  end
end

Version data entries

37 entries across 37 versions & 2 rubygems

Version Path
fog-1.22.0 lib/fog/hp/requests/dns/get_record.rb
fog-1.21.0 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/hp/requests/dns/get_record.rb
fog-1.20.0 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/hp/requests/dns/get_record.rb
fog-1.19.0 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/hp/requests/dns/get_record.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/hp/requests/dns/get_record.rb