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/dreamhost/dns.rb,
lib/fog/rackspace/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/dreamhost/models/dns/zone.rb,
lib/fog/dynect/models/dns/records.rb,
lib/fog/linode/models/dns/records.rb,
lib/fog/rackspace/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/dreamhost/models/dns/zones.rb,
lib/fog/rackspace/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/dreamhost/models/dns/record.rb,
lib/fog/rackspace/models/dns/record.rb,
lib/fog/dnsmadeeasy/models/dns/zones.rb,
lib/fog/dreamhost/models/dns/records.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/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/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/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/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/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/dreamhost/requests/dns/list_records.rb,
lib/fog/rackspace/requests/dns/list_domains.rb,
lib/fog/rackspace/requests/dns/list_records.rb,
lib/fog/dreamhost/requests/dns/create_record.rb,
lib/fog/dreamhost/requests/dns/delete_record.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/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, Dreamhost, Dynect, Linode, Rackspace, 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

Raises:

  • (ArgumentError)


8
9
10
11
12
13
14
15
16
17
18
# File 'lib/fog/dns.rb', line 8

def self.new(attributes)
  attributes = attributes.dup # prevent delete from having side effects
  provider = attributes.delete(:provider).to_s.downcase.to_sym

  if self.providers.include?(provider)
    require "fog/#{provider}/dns"
    return Fog::DNS.const_get(Fog.providers[provider]).new(attributes)
  end

  raise ArgumentError.new("#{provider} is not a recognized dns provider")
end

.providersObject



20
21
22
# File 'lib/fog/dns.rb', line 20

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

.zonesObject



24
25
26
27
28
29
30
31
32
33
# File 'lib/fog/dns.rb', line 24

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