Sha256: 581c8e281b040f695b4b563bb3e57e137d1349a91f6ed44a02269e3d3de32b2b

Contents?: true

Size: 884 Bytes

Versions: 43

Compression:

Stored size: 884 Bytes

Contents

require 'fog/core/model'
require 'fog/dnsmadeeasy/models/dns/records'

module Fog
  module DNS
    class DNSMadeEasy
      class Zone < Fog::Model
        identity  :id
        attribute :domain,      :aliases => 'name'
        attribute :gtd_enabled, :aliases => 'gtdEnabled'
        attribute :nameservers, :aliases => 'nameServer'

        def destroy
          requires :identity
          service.delete_domain(identity)
          true
        end

        def records
          @records ||= begin
            Fog::DNS::DNSMadeEasy::Records.new(
              :zone       => self,
              :service => service
            )
          end
        end

        def save
          requires :domain
          data = service.create_domain(domain).body
          self.identity = data['name']
          merge_attributes(data)
          true
        end
      end
    end
  end
end

Version data entries

43 entries across 41 versions & 6 rubygems

Version Path
fog-2.3.0 lib/fog/dnsmadeeasy/models/dns/zone.rb
fog-ifeel-2.2.0 lib/fog/dnsmadeeasy/models/dns/zone.rb
fog-2.2.0 lib/fog/dnsmadeeasy/models/dns/zone.rb
fog-2.1.0 lib/fog/dnsmadeeasy/models/dns/zone.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-1.42.1/lib/fog/dnsmadeeasy/models/dns/zone.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-1.42.1/lib/fog/dnsmadeeasy/models/dns/zone.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-1.42.1/lib/fog/dnsmadeeasy/models/dns/zone.rb
fog-1.42.1 lib/fog/dnsmadeeasy/models/dns/zone.rb
fog-2.0.0 lib/fog/dnsmadeeasy/models/dns/zone.rb
fog-1.42.0 lib/fog/dnsmadeeasy/models/dns/zone.rb
fog-1.41.0 lib/fog/dnsmadeeasy/models/dns/zone.rb
fog-1.40.0 lib/fog/dnsmadeeasy/models/dns/zone.rb
fog-1.39.0 lib/fog/dnsmadeeasy/models/dns/zone.rb
fog-1.38.0 lib/fog/dnsmadeeasy/models/dns/zone.rb
fog-1.37.0 lib/fog/dnsmadeeasy/models/dns/zone.rb
fog-1.36.0 lib/fog/dnsmadeeasy/models/dns/zone.rb
fog-1.35.0 lib/fog/dnsmadeeasy/models/dns/zone.rb
fog-2.0.0.pre.0 lib/fog/dnsmadeeasy/models/dns/zone.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/dnsmadeeasy/models/dns/zone.rb
fog-1.34.0 lib/fog/dnsmadeeasy/models/dns/zone.rb