Sha256: b99ccbde5652cfb67a324b812920c36423cdbb07d43d194c762d123c4eb1aadc
Contents?: true
Size: 840 Bytes
Versions: 58
Compression:
Stored size: 840 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_domain_by_name(name) @softlayer_domains.each do |domain| if domain[:name] == name response = Excon::Response.new response.body = [ domain ] response.status = 200 return response end end response = Excon::Response.new response.body = [ ] response.status = 200 return response end end class Real def get_domain_by_name(name) request(:dns_domain, "getByDomainName/" + URI::encode(name.to_s, "-")) end end end end end
Version data entries
58 entries across 56 versions & 3 rubygems