Sha256: 0d535ec526c25b7f4870ccc77d1970613edc2c26e697a1375fe32ea21b865514

Contents?: true

Size: 595 Bytes

Versions: 5

Compression:

Stored size: 595 Bytes

Contents

# frozen_string_literal: true

require 'fog/core/collection'
require 'fog/dns/powerdns/models/zone'

module Fog
  module DNS
    class PowerDNS
      class Zones < Fog::Collection
        model Fog::DNS::PowerDNS::Zone

        # attribute :zone,    :aliases => 'name'

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

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

Version data entries

5 entries across 3 versions & 2 rubygems

Version Path
fog-powerdns-0.2.1 lib/fog/dns/powerdns/models/zones.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-powerdns-0.2.0/lib/fog/dns/powerdns/models/zones.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-powerdns-0.2.0/lib/fog/dns/powerdns/models/zones.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-powerdns-0.2.0/lib/fog/dns/powerdns/models/zones.rb
fog-powerdns-0.2.0 lib/fog/dns/powerdns/models/zones.rb