Module: Fog::DNS

Defined in:
lib/fog/dns.rb,
lib/fog/aws/dns.rb,
lib/fog/dynect/dns.rb,
lib/fog/linode/dns.rb,
lib/fog/zerigo/dns.rb,
lib/fog/bluebox/dns.rb,
lib/fog/dnsimple/dns.rb,
lib/fog/rackspace/dns.rb,
lib/fog/slicehost/dns.rb,
lib/fog/dnsmadeeasy/dns.rb,
lib/fog/aws/models/dns/zone.rb,
lib/fog/aws/models/dns/zones.rb,
lib/fog/aws/models/dns/record.rb,
lib/fog/aws/models/dns/records.rb,
lib/fog/dynect/models/dns/zone.rb,
lib/fog/linode/models/dns/zone.rb,
lib/fog/zerigo/models/dns/zone.rb,
lib/fog/bluebox/models/dns/zone.rb,
lib/fog/dynect/models/dns/zones.rb,
lib/fog/linode/models/dns/zones.rb,
lib/fog/zerigo/models/dns/zones.rb,
lib/fog/bluebox/models/dns/zones.rb,
lib/fog/dnsimple/models/dns/zone.rb,
lib/fog/dynect/models/dns/record.rb,
lib/fog/linode/models/dns/record.rb,
lib/fog/zerigo/models/dns/record.rb,
lib/fog/bluebox/models/dns/record.rb,
lib/fog/dnsimple/models/dns/zones.rb,
lib/fog/dynect/models/dns/records.rb,
lib/fog/linode/models/dns/records.rb,
lib/fog/rackspace/models/dns/zone.rb,
lib/fog/slicehost/models/dns/zone.rb,
lib/fog/zerigo/models/dns/records.rb,
lib/fog/bluebox/models/dns/records.rb,
lib/fog/dnsimple/models/dns/record.rb,
lib/fog/rackspace/models/dns/zones.rb,
lib/fog/slicehost/models/dns/zones.rb,
lib/fog/aws/requests/dns/get_change.rb,
lib/fog/dnsimple/models/dns/records.rb,
lib/fog/dnsmadeeasy/models/dns/zone.rb,
lib/fog/rackspace/models/dns/record.rb,
lib/fog/slicehost/models/dns/record.rb,
lib/fog/dnsmadeeasy/models/dns/zones.rb,
lib/fog/dynect/requests/dns/get_zone.rb,
lib/fog/dynect/requests/dns/put_zone.rb,
lib/fog/rackspace/models/dns/records.rb,
lib/fog/slicehost/models/dns/records.rb,
lib/fog/zerigo/requests/dns/get_host.rb,
lib/fog/zerigo/requests/dns/get_zone.rb,
lib/fog/bluebox/requests/dns/get_zone.rb,
lib/fog/dnsmadeeasy/models/dns/record.rb,
lib/fog/dynect/requests/dns/post_zone.rb,
lib/fog/rackspace/models/dns/callback.rb,
lib/fog/bluebox/requests/dns/get_zones.rb,
lib/fog/dnsmadeeasy/models/dns/records.rb,
lib/fog/dynect/requests/dns/get_record.rb,
lib/fog/zerigo/requests/dns/find_hosts.rb,
lib/fog/zerigo/requests/dns/list_hosts.rb,
lib/fog/zerigo/requests/dns/list_zones.rb,
lib/fog/bluebox/requests/dns/get_record.rb,
lib/fog/dynect/requests/dns/delete_zone.rb,
lib/fog/dynect/requests/dns/post_record.rb,
lib/fog/linode/requests/dns/domain_list.rb,
lib/fog/rackspace/requests/dns/callback.rb,
lib/fog/slicehost/requests/dns/get_zone.rb,
lib/fog/zerigo/requests/dns/count_hosts.rb,
lib/fog/zerigo/requests/dns/count_zones.rb,
lib/fog/zerigo/requests/dns/create_host.rb,
lib/fog/zerigo/requests/dns/create_zone.rb,
lib/fog/zerigo/requests/dns/delete_host.rb,
lib/fog/zerigo/requests/dns/delete_zone.rb,
lib/fog/zerigo/requests/dns/update_host.rb,
lib/fog/zerigo/requests/dns/update_zone.rb,
lib/fog/aws/requests/dns/get_hosted_zone.rb,
lib/fog/bluebox/requests/dns/create_zone.rb,
lib/fog/bluebox/requests/dns/delete_zone.rb,
lib/fog/bluebox/requests/dns/get_records.rb,
lib/fog/bluebox/requests/dns/update_zone.rb,
lib/fog/dnsimple/requests/dns/get_domain.rb,
lib/fog/dnsimple/requests/dns/get_record.rb,
lib/fog/dynect/requests/dns/post_session.rb,
lib/fog/slicehost/requests/dns/get_zones.rb,
lib/fog/dynect/requests/dns/delete_record.rb,
lib/fog/dynect/requests/dns/get_node_list.rb,
lib/fog/linode/requests/dns/domain_create.rb,
lib/fog/linode/requests/dns/domain_delete.rb,
lib/fog/linode/requests/dns/domain_update.rb,
lib/fog/slicehost/requests/dns/get_record.rb,
lib/fog/aws/requests/dns/list_hosted_zones.rb,
lib/fog/bluebox/requests/dns/create_record.rb,
lib/fog/bluebox/requests/dns/delete_record.rb,
lib/fog/dnsimple/requests/dns/list_domains.rb,
lib/fog/dnsimple/requests/dns/list_records.rb,
lib/fog/rackspace/requests/dns/add_records.rb,
lib/fog/slicehost/requests/dns/create_zone.rb,
lib/fog/slicehost/requests/dns/delete_zone.rb,
lib/fog/slicehost/requests/dns/get_records.rb,
lib/fog/zerigo/requests/dns/get_zone_stats.rb,
lib/fog/aws/requests/dns/create_hosted_zone.rb,
lib/fog/aws/requests/dns/delete_hosted_zone.rb,
lib/fog/dnsimple/requests/dns/create_domain.rb,
lib/fog/dnsimple/requests/dns/create_record.rb,
lib/fog/dnsimple/requests/dns/delete_domain.rb,
lib/fog/dnsimple/requests/dns/delete_record.rb,
lib/fog/dnsimple/requests/dns/update_record.rb,
lib/fog/dnsmadeeasy/requests/dns/get_domain.rb,
lib/fog/dnsmadeeasy/requests/dns/get_record.rb,
lib/fog/rackspace/requests/dns/list_domains.rb,
lib/fog/rackspace/requests/dns/list_records.rb,
lib/fog/rackspace/requests/dns/modify_domain.rb,
lib/fog/rackspace/requests/dns/modify_record.rb,
lib/fog/rackspace/requests/dns/remove_domain.rb,
lib/fog/rackspace/requests/dns/remove_record.rb,
lib/fog/slicehost/requests/dns/create_record.rb,
lib/fog/slicehost/requests/dns/delete_record.rb,
lib/fog/slicehost/requests/dns/update_record.rb,
lib/fog/dnsmadeeasy/requests/dns/list_domains.rb,
lib/fog/dnsmadeeasy/requests/dns/list_records.rb,
lib/fog/rackspace/requests/dns/create_domains.rb,
lib/fog/rackspace/requests/dns/remove_domains.rb,
lib/fog/rackspace/requests/dns/remove_records.rb,
lib/fog/dnsmadeeasy/requests/dns/create_domain.rb,
lib/fog/dnsmadeeasy/requests/dns/create_record.rb,
lib/fog/dnsmadeeasy/requests/dns/delete_domain.rb,
lib/fog/dnsmadeeasy/requests/dns/delete_record.rb,
lib/fog/dnsmadeeasy/requests/dns/get_secondary.rb,
lib/fog/dnsmadeeasy/requests/dns/update_record.rb,
lib/fog/rackspace/requests/dns/list_subdomains.rb,
lib/fog/dnsmadeeasy/requests/dns/list_secondary.rb,
lib/fog/linode/requests/dns/domain_resource_list.rb,
lib/fog/dnsmadeeasy/requests/dns/create_secondary.rb,
lib/fog/dnsmadeeasy/requests/dns/delete_secondary.rb,
lib/fog/dnsmadeeasy/requests/dns/update_secondary.rb,
lib/fog/aws/requests/dns/list_resource_record_sets.rb,
lib/fog/linode/requests/dns/domain_resource_create.rb,
lib/fog/linode/requests/dns/domain_resource_delete.rb,
lib/fog/linode/requests/dns/domain_resource_update.rb,
lib/fog/rackspace/requests/dns/list_domain_details.rb,
lib/fog/rackspace/requests/dns/list_record_details.rb,
lib/fog/dnsmadeeasy/requests/dns/delete_all_domains.rb,
lib/fog/aws/requests/dns/change_resource_record_sets.rb,
lib/fog/dnsmadeeasy/requests/dns/delete_all_secondary.rb

Defined Under Namespace

Classes: AWS, Bluebox, DNSMadeEasy, DNSimple, Dynect, Linode, Rackspace, 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
36
37
38
39
40
41
# 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/aws/dns'
    Fog::DNS::AWS.new(attributes)
  when :bluebox
    require 'fog/bluebox/dns'
    Fog::DNS::Bluebox.new(attributes)
  when :dnsimple
    require 'fog/dnsimple/dns'
    Fog::DNS::DNSimple.new(attributes)
  when :dnsmadeeasy
    require 'fog/dnsmadeeasy/dns'
    Fog::DNS::DNSMadeEasy.new(attributes)
  when :dynect
    require 'fog/dynect/dns'
    Fog::DNS::Dynect.new(attributes)
  when :linode
    require 'fog/linode/dns'
    Fog::DNS::Linode.new(attributes)
  when :slicehost
    require 'fog/slicehost/dns'
    Fog::DNS::Slicehost.new(attributes)
  when :zerigo
    require 'fog/zerigo/dns'
    Fog::DNS::Zerigo.new(attributes)
  when :rackspace
    require 'fog/rackspace/dns'
    Fog::DNS::Rackspace.new(attributes)
  else
    raise ArgumentError.new("#{provider} is not a recognized dns provider")
  end
end

.providersObject



43
44
45
# File 'lib/fog/dns.rb', line 43

def self.providers
  Fog.services[:dns]
end

.zonesObject



47
48
49
50
51
52
53
54
55
56
# File 'lib/fog/dns.rb', line 47

def self.zones
  zones = []
  for provider in self.providers
    begin
      zones.concat(self[provider].zones)
    rescue # ignore any missing credentials/etc
    end
  end
  zones
end