Class: Fog::HP::DNS::Domains

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/hp/models/dns/domains.rb

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
# File 'lib/fog/hp/models/dns/domains.rb', line 10

def all
  load(service.list_domains.body['domains'])
end

#get(domain_id) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/fog/hp/models/dns/domains.rb', line 14

def get(domain_id)
  ### Inconsistent API - does not return a 'domain'
  if domain = service.get_domain(domain_id).body
    new(domain)
  end
rescue Fog::HP::DNS::NotFound
  nil
end