Module: Fog::DNS

Defined in:
lib/fog/dns.rb,
lib/fog/dns/aws.rb,
lib/fog/dns/linode.rb,
lib/fog/dns/zerigo.rb,
lib/fog/dns/bluebox.rb,
lib/fog/dns/dnsimple.rb,
lib/fog/dns/slicehost.rb,
lib/fog/dns/dnsmadeeasy.rb,
lib/fog/dns/models/aws/zone.rb,
lib/fog/dns/models/aws/zones.rb,
lib/fog/dns/models/aws/record.rb,
lib/fog/dns/models/aws/records.rb,
lib/fog/dns/models/linode/zone.rb,
lib/fog/dns/models/zerigo/zone.rb,
lib/fog/dns/models/bluebox/zone.rb,
lib/fog/dns/models/linode/zones.rb,
lib/fog/dns/models/zerigo/zones.rb,
lib/fog/dns/models/bluebox/zones.rb,
lib/fog/dns/models/dnsimple/zone.rb,
lib/fog/dns/models/linode/record.rb,
lib/fog/dns/models/zerigo/record.rb,
lib/fog/dns/models/bluebox/record.rb,
lib/fog/dns/models/dnsimple/zones.rb,
lib/fog/dns/models/linode/records.rb,
lib/fog/dns/models/slicehost/zone.rb,
lib/fog/dns/models/zerigo/records.rb,
lib/fog/dns/models/bluebox/records.rb,
lib/fog/dns/models/dnsimple/record.rb,
lib/fog/dns/models/slicehost/zones.rb,
lib/fog/dns/models/dnsimple/records.rb,
lib/fog/dns/models/dnsmadeeasy/zone.rb,
lib/fog/dns/models/slicehost/record.rb,
lib/fog/dns/requests/aws/get_change.rb,
lib/fog/dns/models/dnsmadeeasy/zones.rb,
lib/fog/dns/models/slicehost/records.rb,
lib/fog/dns/requests/zerigo/get_host.rb,
lib/fog/dns/requests/zerigo/get_zone.rb,
lib/fog/dns/models/dnsmadeeasy/record.rb,
lib/fog/dns/requests/bluebox/get_zone.rb,
lib/fog/dns/models/dnsmadeeasy/records.rb,
lib/fog/dns/requests/bluebox/get_zones.rb,
lib/fog/dns/requests/zerigo/find_hosts.rb,
lib/fog/dns/requests/zerigo/list_hosts.rb,
lib/fog/dns/requests/zerigo/list_zones.rb,
lib/fog/dns/requests/bluebox/get_record.rb,
lib/fog/dns/requests/linode/domain_list.rb,
lib/fog/dns/requests/slicehost/get_zone.rb,
lib/fog/dns/requests/zerigo/count_hosts.rb,
lib/fog/dns/requests/zerigo/count_zones.rb,
lib/fog/dns/requests/zerigo/create_host.rb,
lib/fog/dns/requests/zerigo/create_zone.rb,
lib/fog/dns/requests/zerigo/delete_host.rb,
lib/fog/dns/requests/zerigo/delete_zone.rb,
lib/fog/dns/requests/zerigo/update_host.rb,
lib/fog/dns/requests/zerigo/update_zone.rb,
lib/fog/dns/requests/aws/get_hosted_zone.rb,
lib/fog/dns/requests/bluebox/create_zone.rb,
lib/fog/dns/requests/bluebox/delete_zone.rb,
lib/fog/dns/requests/bluebox/get_records.rb,
lib/fog/dns/requests/bluebox/update_zone.rb,
lib/fog/dns/requests/dnsimple/get_domain.rb,
lib/fog/dns/requests/dnsimple/get_record.rb,
lib/fog/dns/requests/slicehost/get_zones.rb,
lib/fog/dns/requests/linode/domain_create.rb,
lib/fog/dns/requests/linode/domain_delete.rb,
lib/fog/dns/requests/linode/domain_update.rb,
lib/fog/dns/requests/slicehost/get_record.rb,
lib/fog/dns/requests/aws/list_hosted_zones.rb,
lib/fog/dns/requests/bluebox/create_record.rb,
lib/fog/dns/requests/bluebox/delete_record.rb,
lib/fog/dns/requests/dnsimple/list_domains.rb,
lib/fog/dns/requests/dnsimple/list_records.rb,
lib/fog/dns/requests/slicehost/create_zone.rb,
lib/fog/dns/requests/slicehost/delete_zone.rb,
lib/fog/dns/requests/slicehost/get_records.rb,
lib/fog/dns/requests/zerigo/get_zone_stats.rb,
lib/fog/dns/requests/aws/create_hosted_zone.rb,
lib/fog/dns/requests/aws/delete_hosted_zone.rb,
lib/fog/dns/requests/dnsimple/create_domain.rb,
lib/fog/dns/requests/dnsimple/create_record.rb,
lib/fog/dns/requests/dnsimple/delete_domain.rb,
lib/fog/dns/requests/dnsimple/delete_record.rb,
lib/fog/dns/requests/dnsimple/update_record.rb,
lib/fog/dns/requests/dnsmadeeasy/get_domain.rb,
lib/fog/dns/requests/dnsmadeeasy/get_record.rb,
lib/fog/dns/requests/slicehost/create_record.rb,
lib/fog/dns/requests/slicehost/delete_record.rb,
lib/fog/dns/requests/dnsmadeeasy/list_domains.rb,
lib/fog/dns/requests/dnsmadeeasy/list_records.rb,
lib/fog/dns/requests/dnsmadeeasy/create_domain.rb,
lib/fog/dns/requests/dnsmadeeasy/create_record.rb,
lib/fog/dns/requests/dnsmadeeasy/delete_domain.rb,
lib/fog/dns/requests/dnsmadeeasy/delete_record.rb,
lib/fog/dns/requests/dnsmadeeasy/get_secondary.rb,
lib/fog/dns/requests/dnsmadeeasy/update_record.rb,
lib/fog/dns/requests/dnsmadeeasy/list_secondary.rb,
lib/fog/dns/requests/linode/domain_resource_list.rb,
lib/fog/dns/requests/dnsmadeeasy/create_secondary.rb,
lib/fog/dns/requests/dnsmadeeasy/delete_secondary.rb,
lib/fog/dns/requests/dnsmadeeasy/update_secondary.rb,
lib/fog/dns/requests/aws/list_resource_record_sets.rb,
lib/fog/dns/requests/linode/domain_resource_create.rb,
lib/fog/dns/requests/linode/domain_resource_delete.rb,
lib/fog/dns/requests/linode/domain_resource_update.rb,
lib/fog/dns/requests/dnsmadeeasy/delete_all_domains.rb,
lib/fog/dns/requests/aws/change_resource_record_sets.rb,
lib/fog/dns/requests/dnsmadeeasy/delete_all_secondary.rb

Defined Under Namespace

Classes: AWS, Bluebox, DNSMadeEasy, DNSimple, Linode, Slicehost, Zerigo

Class Method Summary collapse

Class Method Details

.[](provider) ⇒ Object



4
5
6
# File 'lib/fog/dns.rb', line 4

def self.[](provider)
  self.new(:provider => provider)
end

.new(attributes) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/fog/dns.rb', line 8

def self.new(attributes)
  attributes = attributes.dup # prevent delete from having side effects
  case provider = attributes.delete(:provider).to_s.downcase.to_sym
  when :aws
    require 'fog/dns/aws'
    Fog::DNS::AWS.new(attributes)
  when :bluebox
    require 'fog/dns/bluebox'
    Fog::DNS::Bluebox.new(attributes)
  when :dnsimple
    require 'fog/dns/dnsimple'
    Fog::DNS::DNSimple.new(attributes)
  when :dnsmadeeasy
    require 'fog/dns/dnsmadeeasy'
    Fog::DNS::DNSMadeEasy.new(attributes)
  when :linode
    require 'fog/dns/linode'
    Fog::DNS::Linode.new(attributes)
  when :slicehost
    require 'fog/dns/slicehost'
    Fog::DNS::Slicehost.new(attributes)
  when :zerigo
    require 'fog/dns/zerigo'
    Fog::DNS::Zerigo.new(attributes)
  else
    raise ArgumentError.new("#{provider} is not a recognized dns provider")
  end
end

.zonesObject



37
38
39
40
41
42
43
44
45
46
# File 'lib/fog/dns.rb', line 37

def self.zones
  zones = []
  for provider in [:aws, :bluebox, :dnsimple, :dnsmadeeasy, :linode, :slicehost, :zerigo]
    begin
      zones.concat(self[provider].zones)
    rescue # ignore any missing credentials/etc
    end
  end
  zones
end