Parent

Class/Module Index [+]

Quicksearch

Fog::DNS::Softlayer::Domains

Public Instance Methods

all() click to toggle source
# File lib/fog/softlayer/models/dns/domains.rb, line 18
def all
  data = service.get_domains.body
  load(data)
end
create(name) click to toggle source
# File lib/fog/softlayer/models/dns/domains.rb, line 43
def create(name)
  template_object = {
    'name' => name,
    'resourceRecords' => {},
  }
  response = service.create_domain(template_object)
  data = response.body
  new.merge_attributes(data)
end
get(identifier) click to toggle source
# File lib/fog/softlayer/models/dns/domains.rb, line 23
def get(identifier)
  return nil if identifier.nil? || identifier == ""
  response = service.get_domain(identifier)
  data = response.body
  new.merge_attributes(data)
rescue Excon::Errors::NotFound
  nil
end
get_by_name(name) click to toggle source
# File lib/fog/softlayer/models/dns/domains.rb, line 32
def get_by_name(name)
  return nil if name.nil? || name == ""
  response = service.get_domain_by_name(name)
  data = response.body
  return false if data.empty?
  new.merge_attributes(data.first)
rescue Excon::Errors::NotFound
  nil
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.