Module: Fog::DNS

Defined in:
lib/fog/dns.rb,
lib/fog/aws/dns.rb,
lib/fog/rage4/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/storm_on_demand/dns.rb,
lib/fog/aws/models/dns/zones.rb,
lib/fog/aws/models/dns/record.rb,
lib/fog/rage4/models/dns/zone.rb,
lib/fog/aws/models/dns/records.rb,
lib/fog/dynect/models/dns/zone.rb,
lib/fog/linode/models/dns/zone.rb,
lib/fog/rage4/models/dns/zones.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/rage4/models/dns/record.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/rage4/models/dns/records.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/rage4/requests/dns/get_domain.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/dynect/requests/dns/put_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/rage4/requests/dns/list_domains.rb,
lib/fog/rage4/requests/dns/list_records.rb,
lib/fog/storm_on_demand/models/dns/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/rage4/requests/dns/create_domain.rb,
lib/fog/rage4/requests/dns/create_record.rb,
lib/fog/rage4/requests/dns/delete_domain.rb,
lib/fog/rage4/requests/dns/delete_record.rb,
lib/fog/rage4/requests/dns/update_domain.rb,
lib/fog/rage4/requests/dns/update_record.rb,
lib/fog/storm_on_demand/models/dns/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/storm_on_demand/models/dns/domain.rb,
lib/fog/storm_on_demand/models/dns/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/storm_on_demand/models/dns/domains.rb,
lib/fog/storm_on_demand/models/dns/records.rb,
lib/fog/storm_on_demand/models/dns/reverse.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/dynect/requests/dns/get_all_records.rb,
lib/fog/rackspace/requests/dns/list_domains.rb,
lib/fog/rackspace/requests/dns/list_records.rb,
lib/fog/rage4/requests/dns/list_geo_regions.rb,
lib/fog/storm_on_demand/models/dns/reverses.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/rage4/requests/dns/list_record_types.rb,
lib/fog/rage4/requests/dns/show_global_usage.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/rage4/requests/dns/get_domain_by_name.rb,
lib/fog/rage4/requests/dns/show_current_usage.rb,
lib/fog/storm_on_demand/requests/dns/get_zone.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/rage4/requests/dns/set_record_failover.rb,
lib/fog/dnsmadeeasy/requests/dns/list_secondary.rb,
lib/fog/rage4/requests/dns/create_domain_vanity.rb,
lib/fog/storm_on_demand/requests/dns/get_record.rb,
lib/fog/storm_on_demand/requests/dns/list_zones.rb,
lib/fog/linode/requests/dns/domain_resource_list.rb,
lib/fog/storm_on_demand/requests/dns/create_zone.rb,
lib/fog/storm_on_demand/requests/dns/delete_zone.rb,
lib/fog/storm_on_demand/requests/dns/update_zone.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/storm_on_demand/requests/dns/list_domains.rb,
lib/fog/storm_on_demand/requests/dns/list_records.rb,
lib/fog/storm_on_demand/requests/dns/renew_domain.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/rage4/requests/dns/create_reverse_domain_4.rb,
lib/fog/storm_on_demand/requests/dns/create_record.rb,
lib/fog/storm_on_demand/requests/dns/delete_record.rb,
lib/fog/storm_on_demand/requests/dns/update_record.rb,
lib/fog/dnsmadeeasy/requests/dns/delete_all_domains.rb,
lib/fog/storm_on_demand/requests/dns/delete_reverse.rb,
lib/fog/storm_on_demand/requests/dns/update_reverse.rb,
lib/fog/aws/requests/dns/change_resource_record_sets.rb,
lib/fog/dnsmadeeasy/requests/dns/delete_all_secondary.rb,
lib/fog/storm_on_demand/requests/dns/create_record_region.rb,
lib/fog/storm_on_demand/requests/dns/delete_record_region.rb,
lib/fog/storm_on_demand/requests/dns/update_record_region.rb,
lib/fog/storm_on_demand/requests/dns/check_zone_delegation.rb

Defined Under Namespace

Classes: AWS, Bluebox, DNSMadeEasy, DNSimple, Dreamhost, Dynect, Linode, Rackspace, Rage4, StormOnDemand, 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
# 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 :stormondemand
    require 'fog/storm_on_demand/dns'
    Fog::DNS::StormOnDemand.new(attributes)
  else
    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
end

.providersObject



24
25
26
# File 'lib/fog/dns.rb', line 24

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

.zonesObject



28
29
30
31
32
33
34
35
36
37
# File 'lib/fog/dns.rb', line 28

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