Class: Fog::DNS::Rage4::Zones

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

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
13
14
# File 'lib/fog/rage4/models/dns/zones.rb', line 10

def all
  clear
  data = service.list_domains.body
  load(data)
end

#get(zone_name) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/fog/rage4/models/dns/zones.rb', line 16

def get(zone_name)
  data = service.get_domain_by_name(zone_name).body

  if data["status"] && !data["status"]
    nil
  else
    new(data)
  end
rescue Excon::Errors::NotFound
  nil
end