Class: Fog::DNS::PowerDNS::Zones

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

Instance Method Summary collapse

Instance Method Details

#allObject

attribute :zone, :aliases => ‘name’



14
15
16
17
18
# File 'lib/fog/dns/powerdns/models/zones.rb', line 14

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

#get(zone) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/fog/dns/powerdns/models/zones.rb', line 20

def get(zone)
  data = service.get_zone(zone).body['zone']
  zone = new(data)
  zone
rescue Fog::Service::NotFound
  puts 'help!'
end