Sha256: dad99347e2a17d6ac1c190547d3b7edff053fc1cae25831fd9dc0bbec68f509f

Contents?: true

Size: 543 Bytes

Versions: 7

Compression:

Stored size: 543 Bytes

Contents

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

module Fog
  module DNS
    class Zerigo

      class Zones < Fog::Collection

        model Fog::DNS::Zerigo::Zone

        def all
          data = connection.list_zones.body['zones']
          load(data)
        end

        def get(zone_id)
          data = connection.get_zone(zone_id).body
          zone = new(data)
          zone.records.load(data['hosts'])
          zone
        rescue Fog::Service::NotFound
          nil
        end

      end

    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/dns/models/zerigo/zones.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/dns/models/zerigo/zones.rb
fog-0.11.0 lib/fog/dns/models/zerigo/zones.rb
fog-0.10.0 lib/fog/dns/models/zerigo/zones.rb
fog4encbs-0.9.0.1 lib/fog/dns/models/zerigo/zones.rb
fog4encbs-0.9.0 lib/fog/dns/models/zerigo/zones.rb
fog-0.9.0 lib/fog/dns/models/zerigo/zones.rb