Sha256: 8a392b0c8ebcf6e1371e487e0e40aea7685c14decc9a04f6e3a1d06b77b0eb19

Contents?: true

Size: 1.55 KB

Versions: 29

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'].find { |_| _['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

29 entries across 29 versions & 4 rubygems

Version Path
fog-1.37.0 lib/fog/hp/requests/dns/get_record.rb
fog-1.36.0 lib/fog/hp/requests/dns/get_record.rb
fog-1.35.0 lib/fog/hp/requests/dns/get_record.rb
fog-2.0.0.pre.0 lib/fog/hp/requests/dns/get_record.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/hp/requests/dns/get_record.rb
fog-1.34.0 lib/fog/hp/requests/dns/get_record.rb
fog-1.33.0 lib/fog/hp/requests/dns/get_record.rb
fog-1.32.0 lib/fog/hp/requests/dns/get_record.rb
fog-1.31.0 lib/fog/hp/requests/dns/get_record.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/hp/requests/dns/get_record.rb
fog-1.30.0 lib/fog/hp/requests/dns/get_record.rb
fog-1.29.0 lib/fog/hp/requests/dns/get_record.rb
fog-1.28.0 lib/fog/hp/requests/dns/get_record.rb
fog-1.27.0 lib/fog/hp/requests/dns/get_record.rb
fog-1.26.0 lib/fog/hp/requests/dns/get_record.rb
fog-1.25.0 lib/fog/hp/requests/dns/get_record.rb
nsidc-fog-1.24.1 lib/fog/hp/requests/dns/get_record.rb
fog-1.24.0 lib/fog/hp/requests/dns/get_record.rb
ns-fog-1.22.11 lib/fog/hp/requests/dns/get_record.rb
ns-fog-1.22.10 lib/fog/hp/requests/dns/get_record.rb