Sha256: 362d32952ff8fcb4771b12afd288dba97293b6a42077062668c47fa155569d26

Contents?: true

Size: 759 Bytes

Versions: 58

Compression:

Stored size: 759 Bytes

Contents

#
# Author:: Celso Fernandes (<fernandes@zertico.com>)
# © Copyright IBM Corporation 2014.
#
# LICENSE: MIT (http://opensource.org/licenses/MIT)
#
module Fog
  module DNS
    class Softlayer

      class Mock
        def get_records(domain_id)
          @softlayer_domains.each do |domain|
            if domain[:id].to_i == domain_id
              response = Excon::Response.new
              response.body = domain[:resourceRecords]
              response.status = 200
              return response
            end
          end
          raise Excon::Errors::NotFound
        end

      end

      class Real
        def get_records(domain_id)
          request(:dns_domain, domain_id.to_s + '/getResourceRecords')
        end
      end
    end
  end
end

Version data entries

58 entries across 56 versions & 3 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-softlayer-1.1.4/lib/fog/softlayer/requests/dns/get_records.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-softlayer-1.1.4/lib/fog/softlayer/requests/dns/get_records.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-softlayer-1.1.4/lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-1.1.4 lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-1.1.3 lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-1.1.2 lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-1.1.1 lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-1.1.0 lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-1.0.3 lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-1.0.2 lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-1.0.1 lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-1.0.0 lib/fog/softlayer/requests/dns/get_records.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-softlayer-0.4.7/lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-0.4.7 lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-0.4.6 lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-0.4.5 lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-0.4.4 lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-0.4.3 lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-0.4.2 lib/fog/softlayer/requests/dns/get_records.rb
fog-softlayer-0.4.2.pre lib/fog/softlayer/requests/dns/get_records.rb