From a50f46977851dfbcca61c9aaf040053e3fe6e520 Mon Sep 17 00:00:00 2001 From: geemus Date: Wed, 15 Jun 2011 17:25:01 -0700 Subject: [PATCH] [dns] refactor provider/service namespacing --- bin/fog | 1 + lib/fog/bin/aws.rb | 3 +- lib/fog/bin/bluebox.rb | 3 +- lib/fog/bin/dnsimple.rb | 13 ++-- lib/fog/bin/dnsmadeeasy.rb | 13 ++-- lib/fog/bin/linode.rb | 3 +- lib/fog/bin/slicehost.rb | 3 +- lib/fog/bin/zerigo.rb | 3 +- lib/fog/dns.rb | 47 +++++++++----- lib/fog/dns/aws.rb | 18 +----- lib/fog/dns/bluebox.rb | 20 +----- lib/fog/dns/dnsimple.rb | 18 +----- lib/fog/dns/dnsmadeeasy.rb | 20 +----- lib/fog/dns/linode.rb | 22 ++----- lib/fog/dns/models/aws/record.rb | 4 +- lib/fog/dns/models/aws/records.rb | 6 +- lib/fog/dns/models/aws/zone.rb | 6 +- lib/fog/dns/models/aws/zones.rb | 6 +- lib/fog/dns/models/bluebox/record.rb | 4 +- lib/fog/dns/models/bluebox/records.rb | 6 +- lib/fog/dns/models/bluebox/zone.rb | 6 +- lib/fog/dns/models/bluebox/zones.rb | 6 +- lib/fog/dns/models/dnsimple/record.rb | 4 +- lib/fog/dns/models/dnsimple/records.rb | 6 +- lib/fog/dns/models/dnsimple/zone.rb | 14 ++--- lib/fog/dns/models/dnsimple/zones.rb | 6 +- lib/fog/dns/models/dnsmadeeasy/record.rb | 4 +- lib/fog/dns/models/dnsmadeeasy/records.rb | 6 +- lib/fog/dns/models/dnsmadeeasy/zone.rb | 6 +- lib/fog/dns/models/dnsmadeeasy/zones.rb | 6 +- lib/fog/dns/models/linode/record.rb | 4 +- lib/fog/dns/models/linode/records.rb | 6 +- lib/fog/dns/models/linode/zone.rb | 6 +- lib/fog/dns/models/linode/zones.rb | 6 +- lib/fog/dns/models/slicehost/record.rb | 4 +- lib/fog/dns/models/slicehost/records.rb | 6 +- lib/fog/dns/models/slicehost/zone.rb | 6 +- lib/fog/dns/models/slicehost/zones.rb | 6 +- lib/fog/dns/models/zerigo/record.rb | 4 +- lib/fog/dns/models/zerigo/records.rb | 6 +- lib/fog/dns/models/zerigo/zone.rb | 6 +- lib/fog/dns/models/zerigo/zones.rb | 6 +- .../aws/change_resource_record_sets.rb | 4 +- lib/fog/dns/parsers/aws/create_hosted_zone.rb | 4 +- lib/fog/dns/parsers/aws/delete_hosted_zone.rb | 4 +- lib/fog/dns/parsers/aws/get_change.rb | 4 +- lib/fog/dns/parsers/aws/get_hosted_zone.rb | 4 +- lib/fog/dns/parsers/aws/list_hosted_zones.rb | 4 +- .../parsers/aws/list_resource_record_sets.rb | 4 +- lib/fog/dns/parsers/bluebox/create_record.rb | 4 +- lib/fog/dns/parsers/bluebox/create_zone.rb | 4 +- lib/fog/dns/parsers/bluebox/get_record.rb | 4 +- lib/fog/dns/parsers/bluebox/get_records.rb | 5 +- lib/fog/dns/parsers/bluebox/get_zone.rb | 7 ++- lib/fog/dns/parsers/bluebox/get_zones.rb | 4 +- .../dns/parsers/slicehost/create_record.rb | 4 +- lib/fog/dns/parsers/slicehost/create_zone.rb | 4 +- lib/fog/dns/parsers/slicehost/get_record.rb | 4 +- lib/fog/dns/parsers/slicehost/get_records.rb | 4 +- lib/fog/dns/parsers/slicehost/get_zone.rb | 4 +- lib/fog/dns/parsers/slicehost/get_zones.rb | 4 +- lib/fog/dns/parsers/zerigo/count_hosts.rb | 4 +- lib/fog/dns/parsers/zerigo/count_zones.rb | 4 +- lib/fog/dns/parsers/zerigo/create_host.rb | 4 +- lib/fog/dns/parsers/zerigo/create_zone.rb | 4 +- lib/fog/dns/parsers/zerigo/find_hosts.rb | 4 +- lib/fog/dns/parsers/zerigo/get_host.rb | 4 +- lib/fog/dns/parsers/zerigo/get_zone.rb | 4 +- lib/fog/dns/parsers/zerigo/get_zone_stats.rb | 4 +- lib/fog/dns/parsers/zerigo/list_hosts.rb | 4 +- lib/fog/dns/parsers/zerigo/list_zones.rb | 4 +- .../aws/change_resource_record_sets.rb | 6 +- .../dns/requests/aws/create_hosted_zone.rb | 6 +- .../dns/requests/aws/delete_hosted_zone.rb | 6 +- lib/fog/dns/requests/aws/get_change.rb | 6 +- lib/fog/dns/requests/aws/get_hosted_zone.rb | 6 +- lib/fog/dns/requests/aws/list_hosted_zones.rb | 6 +- .../requests/aws/list_resource_record_sets.rb | 6 +- lib/fog/dns/requests/bluebox/create_record.rb | 6 +- lib/fog/dns/requests/bluebox/create_zone.rb | 6 +- lib/fog/dns/requests/bluebox/delete_record.rb | 4 +- lib/fog/dns/requests/bluebox/delete_zone.rb | 4 +- lib/fog/dns/requests/bluebox/get_record.rb | 6 +- lib/fog/dns/requests/bluebox/get_records.rb | 6 +- lib/fog/dns/requests/bluebox/get_zone.rb | 6 +- lib/fog/dns/requests/bluebox/get_zones.rb | 6 +- lib/fog/dns/requests/bluebox/update_zone.rb | 4 +- .../dns/requests/dnsimple/create_domain.rb | 4 +- .../dns/requests/dnsimple/create_record.rb | 4 +- .../dns/requests/dnsimple/delete_domain.rb | 4 +- .../dns/requests/dnsimple/delete_record.rb | 4 +- lib/fog/dns/requests/dnsimple/get_domain.rb | 4 +- lib/fog/dns/requests/dnsimple/get_record.rb | 4 +- lib/fog/dns/requests/dnsimple/list_domains.rb | 4 +- lib/fog/dns/requests/dnsimple/list_records.rb | 4 +- .../dns/requests/dnsimple/update_record.rb | 4 +- .../dns/requests/dnsmadeeasy/create_domain.rb | 4 +- .../dns/requests/dnsmadeeasy/create_record.rb | 4 +- .../requests/dnsmadeeasy/create_secondary.rb | 4 +- .../dnsmadeeasy/delete_all_domains.rb | 4 +- .../dnsmadeeasy/delete_all_secondary.rb | 4 +- .../dns/requests/dnsmadeeasy/delete_domain.rb | 4 +- .../dns/requests/dnsmadeeasy/delete_record.rb | 4 +- .../requests/dnsmadeeasy/delete_secondary.rb | 4 +- .../dns/requests/dnsmadeeasy/get_domain.rb | 4 +- .../dns/requests/dnsmadeeasy/get_record.rb | 4 +- .../dns/requests/dnsmadeeasy/get_secondary.rb | 4 +- .../dns/requests/dnsmadeeasy/list_domains.rb | 4 +- .../dns/requests/dnsmadeeasy/list_records.rb | 4 +- .../requests/dnsmadeeasy/list_secondary.rb | 4 +- .../dns/requests/dnsmadeeasy/update_record.rb | 4 +- .../requests/dnsmadeeasy/update_secondary.rb | 4 +- lib/fog/dns/requests/linode/domain_create.rb | 4 +- lib/fog/dns/requests/linode/domain_delete.rb | 4 +- lib/fog/dns/requests/linode/domain_list.rb | 4 +- .../requests/linode/domain_resource_create.rb | 4 +- .../requests/linode/domain_resource_delete.rb | 4 +- .../requests/linode/domain_resource_list.rb | 4 +- .../requests/linode/domain_resource_update.rb | 4 +- lib/fog/dns/requests/linode/domain_update.rb | 4 +- .../dns/requests/slicehost/create_record.rb | 6 +- lib/fog/dns/requests/slicehost/create_zone.rb | 6 +- .../dns/requests/slicehost/delete_record.rb | 4 +- lib/fog/dns/requests/slicehost/delete_zone.rb | 4 +- lib/fog/dns/requests/slicehost/get_record.rb | 6 +- lib/fog/dns/requests/slicehost/get_records.rb | 6 +- lib/fog/dns/requests/slicehost/get_zone.rb | 6 +- lib/fog/dns/requests/slicehost/get_zones.rb | 6 +- lib/fog/dns/requests/zerigo/count_hosts.rb | 6 +- lib/fog/dns/requests/zerigo/count_zones.rb | 6 +- lib/fog/dns/requests/zerigo/create_host.rb | 6 +- lib/fog/dns/requests/zerigo/create_zone.rb | 6 +- lib/fog/dns/requests/zerigo/delete_host.rb | 4 +- lib/fog/dns/requests/zerigo/delete_zone.rb | 4 +- lib/fog/dns/requests/zerigo/find_hosts.rb | 8 +-- lib/fog/dns/requests/zerigo/get_host.rb | 6 +- lib/fog/dns/requests/zerigo/get_zone.rb | 6 +- lib/fog/dns/requests/zerigo/update_host.rb | 4 +- lib/fog/dns/requests/zerigo/update_zone.rb | 4 +- lib/fog/dns/slicehost.rb | 20 +----- lib/fog/dns/zerigo.rb | 20 +----- lib/fog/storage.rb | 2 +- tests/dns/helper.rb | 22 +++---- tests/dns/models/record_tests.rb | 4 +- tests/dns/models/records_tests.rb | 4 +- tests/dns/models/zone_tests.rb | 4 +- tests/dns/models/zones_tests.rb | 4 +- tests/dns/requests/aws/dns_tests.rb | 30 ++++----- tests/dns/requests/bluebox/dns_tests.rb | 32 +++++----- tests/dns/requests/dnsimple/dns_tests.rb | 20 +++--- tests/dns/requests/dnsmadeeasy/dns_tests.rb | 24 +++---- tests/dns/requests/linode/dns_tests.rb | 32 +++++----- tests/dns/requests/slicehost/dns_tests.rb | 32 +++++----- tests/dns/requests/zerigo/dns_tests.rb | 63 +++++++++---------- 154 files changed, 518 insertions(+), 590 deletions(-) diff --git a/bin/fog b/bin/fog index 9d091cc3c..f6b528d03 100755 --- a/bin/fog +++ b/bin/fog @@ -37,6 +37,7 @@ else providers = Fog.providers # FIXME: hacks until we can `include Fog` in bin + DNS = Fog::DNS Storage = Fog::Storage catch(:IRB_EXIT) { @irb.eval_input } diff --git a/lib/fog/bin/aws.rb b/lib/fog/bin/aws.rb index 31c99a9d8..c3af6a450 100644 --- a/lib/fog/bin/aws.rb +++ b/lib/fog/bin/aws.rb @@ -10,7 +10,7 @@ class AWS < Fog::Bin when :compute Fog::AWS::Compute when :dns - Fog::AWS::DNS + Fog::DNS::AWS when :elb Fog::AWS::ELB when :iam @@ -41,6 +41,7 @@ class AWS < Fog::Bin when :compute Fog::Compute.new(:provider => 'AWS') when :dns + Formatador.display_line("[yellow][WARN] AWS[:dns] is deprecated, use DNS[:aws] instead[/]") Fog::DNS.new(:provider => 'AWS') when :elb Fog::AWS::ELB.new diff --git a/lib/fog/bin/bluebox.rb b/lib/fog/bin/bluebox.rb index ab37c62be..9bbf8faa6 100644 --- a/lib/fog/bin/bluebox.rb +++ b/lib/fog/bin/bluebox.rb @@ -6,7 +6,7 @@ class Bluebox < Fog::Bin when :compute Fog::Bluebox::Compute when :dns - Fog::Bluebox::DNS + Fog::DNS::Bluebox else raise ArgumentError, "Unsupported #{self} service: #{key}" end @@ -18,6 +18,7 @@ class Bluebox < Fog::Bin when :compute Fog::Compute.new(:provider => 'Bluebox') when :dns + Formatador.display_line("[yellow][WARN] Bluebox[:storage] is deprecated, use Storage[:bluebox] instead[/]") Fog::DNS.new(:provider => 'Bluebox') else raise ArgumentError, "Unrecognized service: #{service}" diff --git a/lib/fog/bin/dnsimple.rb b/lib/fog/bin/dnsimple.rb index 1032996e5..98b557eac 100644 --- a/lib/fog/bin/dnsimple.rb +++ b/lib/fog/bin/dnsimple.rb @@ -4,7 +4,7 @@ class DNSimple < Fog::Bin def class_for(key) case key when :dns - Fog::DNSimple::DNS + Fog::DNS::DNSimple else raise ArgumentError, "Unrecognized service: #{key}" end @@ -13,11 +13,12 @@ class DNSimple < Fog::Bin def [](service) @@connections ||= Hash.new do |hash, key| hash[key] = case key - when :dns - Fog::DNS.new(:provider => 'DNSimple') - else - raise ArgumentError, "Unrecognized service: #{key.inspect}" - end + when :dns + Formatador.display_line("[yellow][WARN] DNSimple[:dns] is deprecated, use Storage[:dnsimple] instead[/]") + Fog::DNS.new(:provider => 'DNSimple') + else + raise ArgumentError, "Unrecognized service: #{key.inspect}" + end end @@connections[service] end diff --git a/lib/fog/bin/dnsmadeeasy.rb b/lib/fog/bin/dnsmadeeasy.rb index 6f591ef1d..175f3c1ed 100644 --- a/lib/fog/bin/dnsmadeeasy.rb +++ b/lib/fog/bin/dnsmadeeasy.rb @@ -4,7 +4,7 @@ class DNSMadeEasy < Fog::Bin def class_for(key) case key when :dns - Fog::DNSMadeEasy::DNS + Fog::DNS::DNSMadeEasy else raise ArgumentError, "Unrecognized service: #{key}" end @@ -13,11 +13,12 @@ class DNSMadeEasy < Fog::Bin def [](service) @@connections ||= Hash.new do |hash, key| hash[key] = case key - when :dns - Fog::DNS.new(:provider => 'DNSMadeEasy') - else - raise ArgumentError, "Unrecognized service: #{key.inspect}" - end + when :dns + Formatador.display_line("[yellow][WARN] DNSMadeEasy[:dns] is deprecated, use Storage[:dnsmadeeasy] instead[/]") + Fog::DNS.new(:provider => 'DNSMadeEasy') + else + raise ArgumentError, "Unrecognized service: #{key.inspect}" + end end @@connections[service] end diff --git a/lib/fog/bin/linode.rb b/lib/fog/bin/linode.rb index d55156baa..42066546b 100644 --- a/lib/fog/bin/linode.rb +++ b/lib/fog/bin/linode.rb @@ -6,7 +6,7 @@ class Linode < Fog::Bin when :compute Fog::Linode::Compute when :dns - Fog::Linode::DNS + Fog::DNS::Linode else raise ArgumentError, "Unsupported #{self} service: #{key}" end @@ -18,6 +18,7 @@ class Linode < Fog::Bin when :compute Fog::Compute.new(:provider => 'Linode') when :dns + Formatador.display_line("[yellow][WARN] Linode[:storage] is deprecated, use Storage[:linode] instead[/]") Fog::DNS.new(:provider => 'Linode') else raise ArgumentError, "Unrecognized service: #{key.inspect}" diff --git a/lib/fog/bin/slicehost.rb b/lib/fog/bin/slicehost.rb index 39fc809d4..6ea0da3c9 100644 --- a/lib/fog/bin/slicehost.rb +++ b/lib/fog/bin/slicehost.rb @@ -6,7 +6,7 @@ class Slicehost < Fog::Bin when :compute Fog::Slicehost::Compute when :dns - Fog::Slicehost::DNS + Fog::DNS::Slicehost else raise ArgumentError, "Unrecognized service: #{key}" end @@ -18,6 +18,7 @@ class Slicehost < Fog::Bin when :compute Fog::Compute.new(:provider => 'Slicehost') when :dns + Formatador.display_line("[yellow][WARN] Slicehost[:dns] is deprecated, use Storage[:slicehost] instead[/]") Fog::DNS.new(:provider => 'Slicehost') else raise ArgumentError, "Unrecognized service: #{key.inspect}" diff --git a/lib/fog/bin/zerigo.rb b/lib/fog/bin/zerigo.rb index 18c09aecd..af004f3b3 100644 --- a/lib/fog/bin/zerigo.rb +++ b/lib/fog/bin/zerigo.rb @@ -4,7 +4,7 @@ class Zerigo < Fog::Bin def class_for(key) case key when :dns - Fog::Zerigo::DNS + Fog::DNS::Zerigo else raise ArgumentError, "Unrecognized service: #{key}" end @@ -14,6 +14,7 @@ class Zerigo < Fog::Bin @@connections ||= Hash.new do |hash, key| hash[key] = case key when :dns + Formatador.display_line("[yellow][WARN] Zerigo[:dns] is deprecated, use Storage[:zerigo] instead[/]") Fog::DNS.new(:provider => 'Zerigo') else raise ArgumentError, "Unrecognized service: #{key.inspect}" diff --git a/lib/fog/dns.rb b/lib/fog/dns.rb index 3248af42a..9ed19f358 100644 --- a/lib/fog/dns.rb +++ b/lib/fog/dns.rb @@ -1,34 +1,49 @@ module Fog - class DNS + module DNS + + def self.[](provider) + self.new(:provider => provider) + end def self.new(attributes) attributes = attributes.dup # prevent delete from having side effects - case provider = attributes[:provider] # attributes.delete(:provider) - when 'AWS' + case provider = attributes[:provider].to_s.downcase.to_sym + when :aws require 'fog/dns/aws' - Fog::AWS::DNS.new(attributes) - when 'Bluebox' + Fog::DNS::AWS.new(attributes) + when :bluebox require 'fog/dns/bluebox' - Fog::Bluebox::DNS.new(attributes) - when 'DNSimple' + Fog::DNS::Bluebox.new(attributes) + when :dnsimple require 'fog/dns/dnsimple' - Fog::DNSimple::DNS.new(attributes) - when 'DNSMadeEasy' + Fog::DNS::DNSimple.new(attributes) + when :dnsmadeeasy require 'fog/dns/dnsmadeeasy' - Fog::DNSMadeEasy::DNS.new(attributes) - when 'Linode' + Fog::DNS::DNSMadeEasy.new(attributes) + when :linode require 'fog/dns/linode' - Fog::Linode::DNS.new(attributes) - when 'Slicehost' + Fog::DNS::Linode.new(attributes) + when :slicehost require 'fog/dns/slicehost' - Fog::Slicehost::DNS.new(attributes) - when 'Zerigo' + Fog::DNS::Slicehost.new(attributes) + when :zerigo require 'fog/dns/zerigo' - Fog::Zerigo::DNS.new(attributes) + Fog::DNS::Zerigo.new(attributes) else raise ArgumentError.new("#{provider} is not a recognized dns provider") end end + 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 + end end diff --git a/lib/fog/dns/aws.rb b/lib/fog/dns/aws.rb index 03bc758b2..9ec4daa2d 100644 --- a/lib/fog/dns/aws.rb +++ b/lib/fog/dns/aws.rb @@ -1,6 +1,6 @@ module Fog - module AWS - class DNS < Fog::Service + module DNS + class AWS < Fog::Service requires :aws_access_key_id, :aws_secret_access_key recognizes :host, :path, :port, :scheme, :version, :persistent @@ -38,13 +38,6 @@ module Fog end def initialize(options={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::AWS::DNS.new is deprecated, use Fog::DNS.new(:provider => 'AWS') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - require 'mime/types' @aws_access_key_id = options[:aws_access_key_id] @region = options[:region] @@ -83,13 +76,6 @@ module Fog # ==== Returns # * dns object with connection to aws. def initialize(options={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::AWS::DNS.new is deprecated, use Fog::DNS.new(:provider => 'DNS') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - require 'fog/core/parser' @aws_access_key_id = options[:aws_access_key_id] diff --git a/lib/fog/dns/bluebox.rb b/lib/fog/dns/bluebox.rb index 7b1ed82e1..846eb9389 100644 --- a/lib/fog/dns/bluebox.rb +++ b/lib/fog/dns/bluebox.rb @@ -1,6 +1,6 @@ module Fog - module Bluebox - class DNS < Fog::Service + module DNS + class Bluebox < Fog::Service requires :bluebox_api_key, :bluebox_customer_id recognizes :bluebox_host, :bluebox_port, :bluebox_scheme, :persistent recognizes :provider # remove post deprecation @@ -35,13 +35,6 @@ module Fog end def initialize(options={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::Bluebox::DNS.new is deprecated, use Fog::DNS.new(:provider => 'Bluebox') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - @bluebox_customer_id = options[:bluebox_customer_id] @bluebox_api_key = options[:bluebox_api_key] end @@ -57,13 +50,6 @@ module Fog class Real def initialize(options ={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::Bluebox::DNS.new is deprecated, use Fog::DNS.new(:provider => 'Bluebox') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - @bluebox_customer_id = options[:bluebox_customer_id] @bluebox_api_key = options[:bluebox_api_key] @@ -93,7 +79,7 @@ module Fog rescue Excon::Errors::HTTPStatusError => error raise case error when Excon::Errors::NotFound - Fog::Bluebox::DNS::NotFound.slurp(error) + Fog::DNS::Bluebox::NotFound.slurp(error) else error end diff --git a/lib/fog/dns/dnsimple.rb b/lib/fog/dns/dnsimple.rb index d2005b16e..1045b1d99 100644 --- a/lib/fog/dns/dnsimple.rb +++ b/lib/fog/dns/dnsimple.rb @@ -1,6 +1,6 @@ module Fog - module DNSimple - class DNS < Fog::Service + module DNS + class DNSimple < Fog::Service requires :dnsimple_email, :dnsimple_password recognizes :dnsimple_url, :host, :path, :port, :scheme, :persistent @@ -36,13 +36,6 @@ module Fog end def initialize(options={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::DNS::DNSimple.new is deprecated, use Fog::DNS.new(:provider => 'DNSimple') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - @dnsimple_email = options[:dnsimple_email] @dnsimple_password = options[:dnsimple_password] end @@ -60,13 +53,6 @@ module Fog class Real def initialize(options={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::DNSimple::DNS.new is deprecated, use Fog::DNS.new(:provider => 'DNSimple') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - require 'json' @dnsimple_email = options[:dnsimple_email] diff --git a/lib/fog/dns/dnsmadeeasy.rb b/lib/fog/dns/dnsmadeeasy.rb index 3d719bcbd..b25369edc 100644 --- a/lib/fog/dns/dnsmadeeasy.rb +++ b/lib/fog/dns/dnsmadeeasy.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS < Fog::Service + module DNS + class DNSMadeEasy < Fog::Service requires :dnsmadeeasy_api_key, :dnsmadeeasy_secret_key recognizes :host, :path, :port, :scheme, :persistent @@ -44,13 +44,6 @@ module Fog end def initialize(options={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::DNSMadeEasy::DNS.new is deprecated, use Fog::DNS.new(:provider => 'DNSMadeEasy') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - @dnsmadeeasy_api_key = options[:dnsmadeeasy_api_key] @dnsmadeeasy_secret_key = options[:dnsmadeeasy_secret_key] end @@ -84,13 +77,6 @@ module Fog # ==== Returns # * dns object with connection to aws. def initialize(options={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::DNSMadeEasy::DNS.new is deprecated, use Fog::DNS.new(:provider => 'DNSMadeEasy') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - require 'fog/core/parser' require 'json' @@ -125,7 +111,7 @@ module Fog rescue Excon::Errors::HTTPStatusError => error raise case error when Excon::Errors::NotFound - Fog::DNSMadeEasy::DNS::NotFound.slurp(error) + Fog::DNS::DNSMadeEasy::NotFound.slurp(error) else error end diff --git a/lib/fog/dns/linode.rb b/lib/fog/dns/linode.rb index 96b78001d..d264771a4 100644 --- a/lib/fog/dns/linode.rb +++ b/lib/fog/dns/linode.rb @@ -1,6 +1,6 @@ module Fog - module Linode - class DNS < Fog::Service + module DNS + class Linode < Fog::Service requires :linode_api_key recognizes :port, :scheme, :persistent @@ -35,13 +35,6 @@ module Fog end def initialize(options={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::Linode::DNS.new is deprecated, use Fog::DNS.new(:provider => 'Linode') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - @linode_api_key = options[:linode_api_key] end @@ -58,13 +51,6 @@ module Fog class Real def initialize(options={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::Linode::DNS.new is deprecated, use Fog::DNS.new(:provider => 'Linode') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - require 'json' @linode_api_key = options[:linode_api_key] @host = options[:host] || "api.linode.com" @@ -88,9 +74,9 @@ module Fog if data = response.body['ERRORARRAY'].first error = case data['ERRORCODE'] when 5 - Fog::Linode::DNS::NotFound + Fog::DNS::Linode::NotFound else - Fog::Linode::DNS::Error + Fog::DNS::Linode::Error end raise error.new(data['ERRORMESSAGE']) end diff --git a/lib/fog/dns/models/aws/record.rb b/lib/fog/dns/models/aws/record.rb index 85bbe4c8e..7de3214aa 100644 --- a/lib/fog/dns/models/aws/record.rb +++ b/lib/fog/dns/models/aws/record.rb @@ -1,8 +1,8 @@ require 'fog/core/model' module Fog - module AWS - class DNS + module DNS + class AWS class Record < Fog::Model extend Fog::Deprecation diff --git a/lib/fog/dns/models/aws/records.rb b/lib/fog/dns/models/aws/records.rb index e341a40b7..c529312ba 100644 --- a/lib/fog/dns/models/aws/records.rb +++ b/lib/fog/dns/models/aws/records.rb @@ -2,8 +2,8 @@ require 'fog/core/collection' require 'fog/dns/models/aws/record' module Fog - module AWS - class DNS + module DNS + class AWS class Records < Fog::Collection @@ -16,7 +16,7 @@ module Fog attribute :zone - model Fog::AWS::DNS::Record + model Fog::DNS::AWS::Record def all(options = {}) requires :zone diff --git a/lib/fog/dns/models/aws/zone.rb b/lib/fog/dns/models/aws/zone.rb index 6ff5be436..e17a4522c 100644 --- a/lib/fog/dns/models/aws/zone.rb +++ b/lib/fog/dns/models/aws/zone.rb @@ -2,8 +2,8 @@ require 'fog/core/model' # require 'fog/dns/models/aws/records' module Fog - module AWS - class DNS + module DNS + class AWS class Zone < Fog::Model @@ -23,7 +23,7 @@ module Fog def records @records ||= begin - Fog::AWS::DNS::Records.new( + Fog::DNS::AWS::Records.new( :zone => self, :connection => connection ) diff --git a/lib/fog/dns/models/aws/zones.rb b/lib/fog/dns/models/aws/zones.rb index 86fdc900a..70ebc3fad 100644 --- a/lib/fog/dns/models/aws/zones.rb +++ b/lib/fog/dns/models/aws/zones.rb @@ -2,15 +2,15 @@ require 'fog/core/collection' require 'fog/dns/models/aws/zone' module Fog - module AWS - class DNS + module DNS + class AWS class Zones < Fog::Collection attribute :marker, :aliases => 'Marker' attribute :max_items, :aliases => 'MaxItems' - model Fog::AWS::DNS::Zone + model Fog::DNS::AWS::Zone def all(options = {}) options['marker'] ||= marker diff --git a/lib/fog/dns/models/bluebox/record.rb b/lib/fog/dns/models/bluebox/record.rb index e8d417e60..4156f8cf5 100644 --- a/lib/fog/dns/models/bluebox/record.rb +++ b/lib/fog/dns/models/bluebox/record.rb @@ -1,8 +1,8 @@ require 'fog/core/model' module Fog - module Bluebox - class DNS + module DNS + class Bluebox class Record < Fog::Model extend Fog::Deprecation diff --git a/lib/fog/dns/models/bluebox/records.rb b/lib/fog/dns/models/bluebox/records.rb index dd93548d0..135a08d9c 100644 --- a/lib/fog/dns/models/bluebox/records.rb +++ b/lib/fog/dns/models/bluebox/records.rb @@ -2,14 +2,14 @@ require 'fog/core/collection' require 'fog/dns/models/bluebox/record' module Fog - module Bluebox - class DNS + module DNS + class Bluebox class Records < Fog::Collection attribute :zone - model Fog::Bluebox::DNS::Record + model Fog::DNS::Bluebox::Record def all requires :zone diff --git a/lib/fog/dns/models/bluebox/zone.rb b/lib/fog/dns/models/bluebox/zone.rb index f7ee6c173..25030d037 100644 --- a/lib/fog/dns/models/bluebox/zone.rb +++ b/lib/fog/dns/models/bluebox/zone.rb @@ -2,8 +2,8 @@ require 'fog/core/model' require 'fog/dns/models/bluebox/records' module Fog - module Bluebox - class DNS + module DNS + class Bluebox class Zone < Fog::Model @@ -29,7 +29,7 @@ module Fog def records @records ||= begin - Fog::Bluebox::DNS::Records.new( + Fog::DNS::Bluebox::Records.new( :zone => self, :connection => connection ) diff --git a/lib/fog/dns/models/bluebox/zones.rb b/lib/fog/dns/models/bluebox/zones.rb index 3a6ac9b43..cdcf341ef 100644 --- a/lib/fog/dns/models/bluebox/zones.rb +++ b/lib/fog/dns/models/bluebox/zones.rb @@ -2,12 +2,12 @@ require 'fog/core/collection' require 'fog/dns/models/bluebox/zone' module Fog - module Bluebox - class DNS + module DNS + class Bluebox class Zones < Fog::Collection - model Fog::Bluebox::DNS::Zone + model Fog::DNS::Bluebox::Zone def all data = connection.get_zones.body['zones'] diff --git a/lib/fog/dns/models/dnsimple/record.rb b/lib/fog/dns/models/dnsimple/record.rb index ae59f1dc4..c500de79b 100644 --- a/lib/fog/dns/models/dnsimple/record.rb +++ b/lib/fog/dns/models/dnsimple/record.rb @@ -1,8 +1,8 @@ require 'fog/core/model' module Fog - module DNSimple - class DNS + module DNS + class DNSimple class Record < Fog::Model extend Fog::Deprecation diff --git a/lib/fog/dns/models/dnsimple/records.rb b/lib/fog/dns/models/dnsimple/records.rb index 3caf1f67c..ce032995d 100644 --- a/lib/fog/dns/models/dnsimple/records.rb +++ b/lib/fog/dns/models/dnsimple/records.rb @@ -2,14 +2,14 @@ require 'fog/core/collection' require 'fog/dns/models/dnsimple/record' module Fog - module DNSimple - class DNS + module DNS + class DNSimple class Records < Fog::Collection attribute :zone - model Fog::DNSimple::DNS::Record + model Fog::DNS::DNSimple::Record def all requires :zone diff --git a/lib/fog/dns/models/dnsimple/zone.rb b/lib/fog/dns/models/dnsimple/zone.rb index decee5684..44b379ccd 100644 --- a/lib/fog/dns/models/dnsimple/zone.rb +++ b/lib/fog/dns/models/dnsimple/zone.rb @@ -2,8 +2,8 @@ require 'fog/core/model' require 'fog/dns/models/dnsimple/records' module Fog - module DNSimple - class DNS + module DNS + class DNSimple class Zone < Fog::Model @@ -20,11 +20,11 @@ module Fog def records @records ||= begin - Fog::DNSimple::DNS::Records.new( - :zone => self, - :connection => connection - ) - end + Fog::DNS::DNSimple::Records.new( + :zone => self, + :connection => connection + ) + end end def nameservers diff --git a/lib/fog/dns/models/dnsimple/zones.rb b/lib/fog/dns/models/dnsimple/zones.rb index 77c5241f5..1663672df 100644 --- a/lib/fog/dns/models/dnsimple/zones.rb +++ b/lib/fog/dns/models/dnsimple/zones.rb @@ -2,12 +2,12 @@ require 'fog/core/collection' require 'fog/dns/models/dnsimple/zone' module Fog - module DNSimple - class DNS + module DNS + class DNSimple class Zones < Fog::Collection - model Fog::DNSimple::DNS::Zone + model Fog::DNS::DNSimple::Zone def all clear diff --git a/lib/fog/dns/models/dnsmadeeasy/record.rb b/lib/fog/dns/models/dnsmadeeasy/record.rb index a2dc18607..dea40360a 100644 --- a/lib/fog/dns/models/dnsmadeeasy/record.rb +++ b/lib/fog/dns/models/dnsmadeeasy/record.rb @@ -1,8 +1,8 @@ require 'fog/core/model' module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Record < Fog::Model extend Fog::Deprecation diff --git a/lib/fog/dns/models/dnsmadeeasy/records.rb b/lib/fog/dns/models/dnsmadeeasy/records.rb index 9ae6f20e9..3aa0f477e 100644 --- a/lib/fog/dns/models/dnsmadeeasy/records.rb +++ b/lib/fog/dns/models/dnsmadeeasy/records.rb @@ -2,14 +2,14 @@ require 'fog/core/collection' require 'fog/dns/models/dnsmadeeasy/record' module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Records < Fog::Collection attribute :zone - model Fog::DNSMadeEasy::DNS::Record + model Fog::DNS::DNSMadeEasy::Record def all requires :zone diff --git a/lib/fog/dns/models/dnsmadeeasy/zone.rb b/lib/fog/dns/models/dnsmadeeasy/zone.rb index 7ee0a5f79..3fe2a0d53 100644 --- a/lib/fog/dns/models/dnsmadeeasy/zone.rb +++ b/lib/fog/dns/models/dnsmadeeasy/zone.rb @@ -2,8 +2,8 @@ require 'fog/core/model' require 'fog/dns/models/dnsmadeeasy/records' module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Zone < Fog::Model @@ -20,7 +20,7 @@ module Fog def records @records ||= begin - Fog::DNSMadeEasy::DNS::Records.new( + Fog::DNS::DNSMadeEasy::Records.new( :zone => self, :connection => connection ) diff --git a/lib/fog/dns/models/dnsmadeeasy/zones.rb b/lib/fog/dns/models/dnsmadeeasy/zones.rb index 3254e54d9..f56468d57 100644 --- a/lib/fog/dns/models/dnsmadeeasy/zones.rb +++ b/lib/fog/dns/models/dnsmadeeasy/zones.rb @@ -2,12 +2,12 @@ require 'fog/core/collection' require 'fog/dns/models/dnsmadeeasy/zone' module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Zones < Fog::Collection - model Fog::DNSMadeEasy::DNS::Zone + model Fog::DNS::DNSMadeEasy::Zone def all clear diff --git a/lib/fog/dns/models/linode/record.rb b/lib/fog/dns/models/linode/record.rb index e82c4e828..03c2d1bed 100644 --- a/lib/fog/dns/models/linode/record.rb +++ b/lib/fog/dns/models/linode/record.rb @@ -1,8 +1,8 @@ require 'fog/core/model' module Fog - module Linode - class DNS + module DNS + class Linode class Record < Fog::Model extend Fog::Deprecation diff --git a/lib/fog/dns/models/linode/records.rb b/lib/fog/dns/models/linode/records.rb index d28830a4e..e39a9877d 100644 --- a/lib/fog/dns/models/linode/records.rb +++ b/lib/fog/dns/models/linode/records.rb @@ -2,14 +2,14 @@ require 'fog/core/collection' require 'fog/dns/models/linode/record' module Fog - module Linode - class DNS + module DNS + class Linode class Records < Fog::Collection attribute :zone - model Fog::Linode::DNS::Record + model Fog::DNS::Linode::Record def all requires :zone diff --git a/lib/fog/dns/models/linode/zone.rb b/lib/fog/dns/models/linode/zone.rb index 99646f7aa..50daf19d5 100644 --- a/lib/fog/dns/models/linode/zone.rb +++ b/lib/fog/dns/models/linode/zone.rb @@ -2,8 +2,8 @@ require 'fog/core/model' require 'fog/dns/models/linode/records' module Fog - module Linode - class DNS + module DNS + class Linode class Zone < Fog::Model @@ -36,7 +36,7 @@ module Fog def records @records ||= begin - Fog::Linode::DNS::Records.new( + Fog::DNS::Linode::Records.new( :zone => self, :connection => connection ) diff --git a/lib/fog/dns/models/linode/zones.rb b/lib/fog/dns/models/linode/zones.rb index 18e13e53d..93821726b 100644 --- a/lib/fog/dns/models/linode/zones.rb +++ b/lib/fog/dns/models/linode/zones.rb @@ -2,12 +2,12 @@ require 'fog/core/collection' require 'fog/dns/models/linode/zone' module Fog - module Linode - class DNS + module DNS + class Linode class Zones < Fog::Collection - model Fog::Linode::DNS::Zone + model Fog::DNS::Linode::Zone def all data = connection.domain_list.body['DATA'] diff --git a/lib/fog/dns/models/slicehost/record.rb b/lib/fog/dns/models/slicehost/record.rb index f39333217..686292f45 100644 --- a/lib/fog/dns/models/slicehost/record.rb +++ b/lib/fog/dns/models/slicehost/record.rb @@ -1,8 +1,8 @@ require 'fog/core/model' module Fog - module Slicehost - class DNS + module DNS + class Slicehost class Record < Fog::Model extend Fog::Deprecation diff --git a/lib/fog/dns/models/slicehost/records.rb b/lib/fog/dns/models/slicehost/records.rb index 016022163..43e460abf 100644 --- a/lib/fog/dns/models/slicehost/records.rb +++ b/lib/fog/dns/models/slicehost/records.rb @@ -2,14 +2,14 @@ require 'fog/core/collection' require 'fog/dns/models/slicehost/record' module Fog - module Slicehost - class DNS + module DNS + class Slicehost class Records < Fog::Collection attribute :zone - model Fog::Slicehost::DNS::Record + model Fog::DNS::Slicehost::Record def all requires :zone diff --git a/lib/fog/dns/models/slicehost/zone.rb b/lib/fog/dns/models/slicehost/zone.rb index b30dab808..f2bb0014d 100644 --- a/lib/fog/dns/models/slicehost/zone.rb +++ b/lib/fog/dns/models/slicehost/zone.rb @@ -2,8 +2,8 @@ require 'fog/core/model' require 'fog/dns/models/slicehost/records' module Fog - module Slicehost - class DNS + module DNS + class Slicehost class Zone < Fog::Model @@ -36,7 +36,7 @@ module Fog def records @records ||= begin - Fog::Slicehost::DNS::Records.new( + Fog::DNS::Slicehost::Records.new( :zone => self, :connection => connection ) diff --git a/lib/fog/dns/models/slicehost/zones.rb b/lib/fog/dns/models/slicehost/zones.rb index 82abcf60e..9b0de8294 100644 --- a/lib/fog/dns/models/slicehost/zones.rb +++ b/lib/fog/dns/models/slicehost/zones.rb @@ -2,12 +2,12 @@ require 'fog/core/collection' require 'fog/dns/models/slicehost/zone' module Fog - module Slicehost - class DNS + module DNS + class Slicehost class Zones < Fog::Collection - model Fog::Slicehost::DNS::Zone + model Fog::DNS::Slicehost::Zone def all data = connection.get_zones.body['zones'] diff --git a/lib/fog/dns/models/zerigo/record.rb b/lib/fog/dns/models/zerigo/record.rb index 6c0f364d6..005acba89 100644 --- a/lib/fog/dns/models/zerigo/record.rb +++ b/lib/fog/dns/models/zerigo/record.rb @@ -1,8 +1,8 @@ require 'fog/core/model' module Fog - module Zerigo - class DNS + module DNS + class Zerigo class Record < Fog::Model extend Fog::Deprecation diff --git a/lib/fog/dns/models/zerigo/records.rb b/lib/fog/dns/models/zerigo/records.rb index 1e25bb8c8..c8f8d7d07 100644 --- a/lib/fog/dns/models/zerigo/records.rb +++ b/lib/fog/dns/models/zerigo/records.rb @@ -2,14 +2,14 @@ require 'fog/core/collection' require 'fog/dns/models/zerigo/record' module Fog - module Zerigo - class DNS + module DNS + class Zerigo class Records < Fog::Collection attribute :zone - model Fog::Zerigo::DNS::Record + model Fog::DNS::Zerigo::Record def all requires :zone diff --git a/lib/fog/dns/models/zerigo/zone.rb b/lib/fog/dns/models/zerigo/zone.rb index 2b3ca4088..f9a35a4ac 100644 --- a/lib/fog/dns/models/zerigo/zone.rb +++ b/lib/fog/dns/models/zerigo/zone.rb @@ -2,8 +2,8 @@ require 'fog/core/model' require 'fog/dns/models/zerigo/records' module Fog - module Zerigo - class DNS + module DNS + class Zerigo class Zone < Fog::Model @@ -39,7 +39,7 @@ module Fog def records @records ||= begin - Fog::Zerigo::DNS::Records.new( + Fog::DNS::Zerigo::Records.new( :zone => self, :connection => connection ) diff --git a/lib/fog/dns/models/zerigo/zones.rb b/lib/fog/dns/models/zerigo/zones.rb index 590706e73..68c75fae6 100644 --- a/lib/fog/dns/models/zerigo/zones.rb +++ b/lib/fog/dns/models/zerigo/zones.rb @@ -2,12 +2,12 @@ require 'fog/core/collection' require 'fog/dns/models/zerigo/zone' module Fog - module Zerigo - class DNS + module DNS + class Zerigo class Zones < Fog::Collection - model Fog::Zerigo::DNS::Zone + model Fog::DNS::Zerigo::Zone def all data = connection.list_zones.body['zones'] diff --git a/lib/fog/dns/parsers/aws/change_resource_record_sets.rb b/lib/fog/dns/parsers/aws/change_resource_record_sets.rb index 65636c02f..b1ccff006 100644 --- a/lib/fog/dns/parsers/aws/change_resource_record_sets.rb +++ b/lib/fog/dns/parsers/aws/change_resource_record_sets.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module AWS - module DNS + module DNS + module AWS class ChangeResourceRecordSets < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/aws/create_hosted_zone.rb b/lib/fog/dns/parsers/aws/create_hosted_zone.rb index 667c4c039..290b09cec 100644 --- a/lib/fog/dns/parsers/aws/create_hosted_zone.rb +++ b/lib/fog/dns/parsers/aws/create_hosted_zone.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module AWS - module DNS + module DNS + module AWS class CreateHostedZone < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/aws/delete_hosted_zone.rb b/lib/fog/dns/parsers/aws/delete_hosted_zone.rb index d7aae5df9..9c65d85b9 100644 --- a/lib/fog/dns/parsers/aws/delete_hosted_zone.rb +++ b/lib/fog/dns/parsers/aws/delete_hosted_zone.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module AWS - module DNS + module DNS + module AWS class DeleteHostedZone < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/aws/get_change.rb b/lib/fog/dns/parsers/aws/get_change.rb index 0e0752df1..e861b43a0 100644 --- a/lib/fog/dns/parsers/aws/get_change.rb +++ b/lib/fog/dns/parsers/aws/get_change.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module AWS - module DNS + module DNS + module AWS class GetChange < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/aws/get_hosted_zone.rb b/lib/fog/dns/parsers/aws/get_hosted_zone.rb index 3edab4e9e..f676b6191 100644 --- a/lib/fog/dns/parsers/aws/get_hosted_zone.rb +++ b/lib/fog/dns/parsers/aws/get_hosted_zone.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module AWS - module DNS + module DNS + module AWS class GetHostedZone < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/aws/list_hosted_zones.rb b/lib/fog/dns/parsers/aws/list_hosted_zones.rb index 657fba7ae..67a5a8b0e 100644 --- a/lib/fog/dns/parsers/aws/list_hosted_zones.rb +++ b/lib/fog/dns/parsers/aws/list_hosted_zones.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module AWS - module DNS + module DNS + module AWS class ListHostedZones < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/aws/list_resource_record_sets.rb b/lib/fog/dns/parsers/aws/list_resource_record_sets.rb index 8535e9394..62fa180b7 100644 --- a/lib/fog/dns/parsers/aws/list_resource_record_sets.rb +++ b/lib/fog/dns/parsers/aws/list_resource_record_sets.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module AWS - module DNS + module DNS + module AWS class ListResourceRecordSets < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/bluebox/create_record.rb b/lib/fog/dns/parsers/bluebox/create_record.rb index c925a356f..acc77130f 100644 --- a/lib/fog/dns/parsers/bluebox/create_record.rb +++ b/lib/fog/dns/parsers/bluebox/create_record.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Bluebox - module DNS + module DNS + module Bluebox class CreateRecord < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/bluebox/create_zone.rb b/lib/fog/dns/parsers/bluebox/create_zone.rb index bac49e08e..dd222d363 100644 --- a/lib/fog/dns/parsers/bluebox/create_zone.rb +++ b/lib/fog/dns/parsers/bluebox/create_zone.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Bluebox - module DNS + module DNS + module Bluebox class CreateZone < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/bluebox/get_record.rb b/lib/fog/dns/parsers/bluebox/get_record.rb index f8d393412..b6979ac8d 100644 --- a/lib/fog/dns/parsers/bluebox/get_record.rb +++ b/lib/fog/dns/parsers/bluebox/get_record.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Bluebox - module DNS + module DNS + module Bluebox class GetRecord < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/bluebox/get_records.rb b/lib/fog/dns/parsers/bluebox/get_records.rb index 2d3854ce5..faf3785f2 100644 --- a/lib/fog/dns/parsers/bluebox/get_records.rb +++ b/lib/fog/dns/parsers/bluebox/get_records.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Bluebox - module DNS + module DNS + module Bluebox class GetRecords < Fog::Parsers::Base @@ -19,6 +19,7 @@ module Fog @record[name] = value end end + end end diff --git a/lib/fog/dns/parsers/bluebox/get_zone.rb b/lib/fog/dns/parsers/bluebox/get_zone.rb index 9aa6878b8..44ffb8046 100644 --- a/lib/fog/dns/parsers/bluebox/get_zone.rb +++ b/lib/fog/dns/parsers/bluebox/get_zone.rb @@ -1,7 +1,8 @@ module Fog module Parsers - module Bluebox - module DNS + module DNS + module Bluebox + class GetZone < Fog::Parsers::Base def reset @@ -16,7 +17,9 @@ module Fog @response[name] = value end end + end + end end end diff --git a/lib/fog/dns/parsers/bluebox/get_zones.rb b/lib/fog/dns/parsers/bluebox/get_zones.rb index 2e5c7c9e6..117e55bdf 100644 --- a/lib/fog/dns/parsers/bluebox/get_zones.rb +++ b/lib/fog/dns/parsers/bluebox/get_zones.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Bluebox - module DNS + module DNS + module Bluebox class GetZones < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/slicehost/create_record.rb b/lib/fog/dns/parsers/slicehost/create_record.rb index 2e7b1a27f..49eb4030d 100644 --- a/lib/fog/dns/parsers/slicehost/create_record.rb +++ b/lib/fog/dns/parsers/slicehost/create_record.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Slicehost - module DNS + module DNS + module Slicehost class CreateRecord < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/slicehost/create_zone.rb b/lib/fog/dns/parsers/slicehost/create_zone.rb index a296e99c1..63727af44 100644 --- a/lib/fog/dns/parsers/slicehost/create_zone.rb +++ b/lib/fog/dns/parsers/slicehost/create_zone.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Slicehost - module DNS + module DNS + module Slicehost class CreateZone < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/slicehost/get_record.rb b/lib/fog/dns/parsers/slicehost/get_record.rb index a51fb2d35..b4ae56a06 100644 --- a/lib/fog/dns/parsers/slicehost/get_record.rb +++ b/lib/fog/dns/parsers/slicehost/get_record.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Slicehost - module DNS + module DNS + module Slicehost class GetRecord < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/slicehost/get_records.rb b/lib/fog/dns/parsers/slicehost/get_records.rb index 049eba910..fb18aef32 100644 --- a/lib/fog/dns/parsers/slicehost/get_records.rb +++ b/lib/fog/dns/parsers/slicehost/get_records.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Slicehost - module DNS + module DNS + module Slicehost class GetRecords < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/slicehost/get_zone.rb b/lib/fog/dns/parsers/slicehost/get_zone.rb index d0af4146b..beaeb5f65 100644 --- a/lib/fog/dns/parsers/slicehost/get_zone.rb +++ b/lib/fog/dns/parsers/slicehost/get_zone.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Slicehost - module DNS + module DNS + module Slicehost class GetZone < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/slicehost/get_zones.rb b/lib/fog/dns/parsers/slicehost/get_zones.rb index 8ae35ef79..91eb9c9bb 100644 --- a/lib/fog/dns/parsers/slicehost/get_zones.rb +++ b/lib/fog/dns/parsers/slicehost/get_zones.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Slicehost - module DNS + module DNS + module Slicehost class GetZones < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/zerigo/count_hosts.rb b/lib/fog/dns/parsers/zerigo/count_hosts.rb index 479669f96..95fc7ec5a 100644 --- a/lib/fog/dns/parsers/zerigo/count_hosts.rb +++ b/lib/fog/dns/parsers/zerigo/count_hosts.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Zerigo - module DNS + module DNS + module Zerigo class CountHosts < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/zerigo/count_zones.rb b/lib/fog/dns/parsers/zerigo/count_zones.rb index 931b9793e..3c58956e6 100644 --- a/lib/fog/dns/parsers/zerigo/count_zones.rb +++ b/lib/fog/dns/parsers/zerigo/count_zones.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Zerigo - module DNS + module DNS + module Zerigo class CountZones < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/zerigo/create_host.rb b/lib/fog/dns/parsers/zerigo/create_host.rb index de63b13f8..a98959ce0 100644 --- a/lib/fog/dns/parsers/zerigo/create_host.rb +++ b/lib/fog/dns/parsers/zerigo/create_host.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Zerigo - module DNS + module DNS + module Zerigo class CreateHost < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/zerigo/create_zone.rb b/lib/fog/dns/parsers/zerigo/create_zone.rb index c03f254d5..77bcb14d1 100644 --- a/lib/fog/dns/parsers/zerigo/create_zone.rb +++ b/lib/fog/dns/parsers/zerigo/create_zone.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Zerigo - module DNS + module DNS + module Zerigo class CreateZone < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/zerigo/find_hosts.rb b/lib/fog/dns/parsers/zerigo/find_hosts.rb index 0bb9686af..d05b6ab4d 100644 --- a/lib/fog/dns/parsers/zerigo/find_hosts.rb +++ b/lib/fog/dns/parsers/zerigo/find_hosts.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Zerigo - module DNS + module DNS + module Zerigo class FindHosts < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/zerigo/get_host.rb b/lib/fog/dns/parsers/zerigo/get_host.rb index bdc510ae1..b207e7c62 100644 --- a/lib/fog/dns/parsers/zerigo/get_host.rb +++ b/lib/fog/dns/parsers/zerigo/get_host.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Zerigo - module DNS + module DNS + module Zerigo class GetHost < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/zerigo/get_zone.rb b/lib/fog/dns/parsers/zerigo/get_zone.rb index a1b77d4fc..2d33ddfc7 100644 --- a/lib/fog/dns/parsers/zerigo/get_zone.rb +++ b/lib/fog/dns/parsers/zerigo/get_zone.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Zerigo - module DNS + module DNS + module Zerigo class GetZone < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/zerigo/get_zone_stats.rb b/lib/fog/dns/parsers/zerigo/get_zone_stats.rb index 30649ce76..43c257c20 100644 --- a/lib/fog/dns/parsers/zerigo/get_zone_stats.rb +++ b/lib/fog/dns/parsers/zerigo/get_zone_stats.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Zerigo - module DNS + module DNS + module Zerigo class GetZoneStats < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/zerigo/list_hosts.rb b/lib/fog/dns/parsers/zerigo/list_hosts.rb index a4513eb06..158d3c3e4 100644 --- a/lib/fog/dns/parsers/zerigo/list_hosts.rb +++ b/lib/fog/dns/parsers/zerigo/list_hosts.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Zerigo - module DNS + module DNS + module Zerigo class ListHosts < Fog::Parsers::Base diff --git a/lib/fog/dns/parsers/zerigo/list_zones.rb b/lib/fog/dns/parsers/zerigo/list_zones.rb index 3c16d5abe..73359f89d 100644 --- a/lib/fog/dns/parsers/zerigo/list_zones.rb +++ b/lib/fog/dns/parsers/zerigo/list_zones.rb @@ -1,7 +1,7 @@ module Fog module Parsers - module Zerigo - module DNS + module DNS + module Zerigo class ListZones < Fog::Parsers::Base diff --git a/lib/fog/dns/requests/aws/change_resource_record_sets.rb b/lib/fog/dns/requests/aws/change_resource_record_sets.rb index b55651ee7..b4d9ec1cd 100644 --- a/lib/fog/dns/requests/aws/change_resource_record_sets.rb +++ b/lib/fog/dns/requests/aws/change_resource_record_sets.rb @@ -1,6 +1,6 @@ module Fog - module AWS - class DNS + module DNS + class AWS class Real require 'fog/dns/parsers/aws/change_resource_record_sets' @@ -68,7 +68,7 @@ module Fog body = %Q{#{changes}} request({ :body => body, - :parser => Fog::Parsers::AWS::DNS::ChangeResourceRecordSets.new, + :parser => Fog::Parsers::DNS::AWS::ChangeResourceRecordSets.new, :expects => 200, :method => 'POST', :path => "hostedzone/#{zone_id}/rrset" diff --git a/lib/fog/dns/requests/aws/create_hosted_zone.rb b/lib/fog/dns/requests/aws/create_hosted_zone.rb index 5fd8fd1fd..1203c6d1f 100644 --- a/lib/fog/dns/requests/aws/create_hosted_zone.rb +++ b/lib/fog/dns/requests/aws/create_hosted_zone.rb @@ -1,6 +1,6 @@ module Fog - module AWS - class DNS + module DNS + class AWS class Real require 'fog/dns/parsers/aws/create_hosted_zone' @@ -45,7 +45,7 @@ module Fog request({ :body => %Q{#{name}#{optional_tags}}, - :parser => Fog::Parsers::AWS::DNS::CreateHostedZone.new, + :parser => Fog::Parsers::DNS::AWS::CreateHostedZone.new, :expects => 201, :method => 'POST', :path => "hostedzone" diff --git a/lib/fog/dns/requests/aws/delete_hosted_zone.rb b/lib/fog/dns/requests/aws/delete_hosted_zone.rb index c9ab173d8..350bad9a7 100644 --- a/lib/fog/dns/requests/aws/delete_hosted_zone.rb +++ b/lib/fog/dns/requests/aws/delete_hosted_zone.rb @@ -1,6 +1,6 @@ module Fog - module AWS - class DNS + module DNS + class AWS class Real require 'fog/dns/parsers/aws/delete_hosted_zone' @@ -26,7 +26,7 @@ module Fog request({ :expects => 200, - :parser => Fog::Parsers::AWS::DNS::DeleteHostedZone.new, + :parser => Fog::Parsers::DNS::AWS::DeleteHostedZone.new, :method => 'DELETE', :path => "hostedzone/#{zone_id}" }) diff --git a/lib/fog/dns/requests/aws/get_change.rb b/lib/fog/dns/requests/aws/get_change.rb index 78ef34133..4d3eeb7ed 100644 --- a/lib/fog/dns/requests/aws/get_change.rb +++ b/lib/fog/dns/requests/aws/get_change.rb @@ -1,6 +1,6 @@ module Fog - module AWS - class DNS + module DNS + class AWS class Real require 'fog/dns/parsers/aws/get_change' @@ -25,7 +25,7 @@ module Fog request({ :expects => 200, - :parser => Fog::Parsers::AWS::DNS::GetChange.new, + :parser => Fog::Parsers::DNS::AWS::GetChange.new, :method => 'GET', :path => "change/#{change_id}" }) diff --git a/lib/fog/dns/requests/aws/get_hosted_zone.rb b/lib/fog/dns/requests/aws/get_hosted_zone.rb index 5c6488845..0e40b7880 100644 --- a/lib/fog/dns/requests/aws/get_hosted_zone.rb +++ b/lib/fog/dns/requests/aws/get_hosted_zone.rb @@ -1,6 +1,6 @@ module Fog - module AWS - class DNS + module DNS + class AWS class Real require 'fog/dns/parsers/aws/get_hosted_zone' @@ -29,7 +29,7 @@ module Fog request({ :expects => 200, - :parser => Fog::Parsers::AWS::DNS::GetHostedZone.new, + :parser => Fog::Parsers::DNS::AWS::GetHostedZone.new, :method => 'GET', :path => "hostedzone/#{zone_id}" }) diff --git a/lib/fog/dns/requests/aws/list_hosted_zones.rb b/lib/fog/dns/requests/aws/list_hosted_zones.rb index e0498aa4d..8f9530cb9 100644 --- a/lib/fog/dns/requests/aws/list_hosted_zones.rb +++ b/lib/fog/dns/requests/aws/list_hosted_zones.rb @@ -1,6 +1,6 @@ module Fog - module AWS - class DNS + module DNS + class AWS class Real require 'fog/dns/parsers/aws/list_hosted_zones' @@ -40,7 +40,7 @@ module Fog request({ :query => parameters, - :parser => Fog::Parsers::AWS::DNS::ListHostedZones.new, + :parser => Fog::Parsers::DNS::AWS::ListHostedZones.new, :expects => 200, :method => 'GET', :path => "hostedzone" diff --git a/lib/fog/dns/requests/aws/list_resource_record_sets.rb b/lib/fog/dns/requests/aws/list_resource_record_sets.rb index db1db9474..90f7ec80f 100644 --- a/lib/fog/dns/requests/aws/list_resource_record_sets.rb +++ b/lib/fog/dns/requests/aws/list_resource_record_sets.rb @@ -1,6 +1,6 @@ module Fog - module AWS - class DNS + module DNS + class AWS class Real require 'fog/dns/parsers/aws/list_resource_record_sets' @@ -46,7 +46,7 @@ module Fog request({ :query => parameters, - :parser => Fog::Parsers::AWS::DNS::ListResourceRecordSets.new, + :parser => Fog::Parsers::DNS::AWS::ListResourceRecordSets.new, :expects => 200, :method => 'GET', :path => "hostedzone/#{zone_id}/rrset" diff --git a/lib/fog/dns/requests/bluebox/create_record.rb b/lib/fog/dns/requests/bluebox/create_record.rb index 5f58464fe..3b699e4f3 100644 --- a/lib/fog/dns/requests/bluebox/create_record.rb +++ b/lib/fog/dns/requests/bluebox/create_record.rb @@ -1,6 +1,6 @@ module Fog - module Bluebox - class DNS + module DNS + class Bluebox class Real require 'fog/dns/parsers/bluebox/create_record' @@ -29,7 +29,7 @@ module Fog :body => body, :expects => 202, :method => 'POST', - :parser => Fog::Parsers::Bluebox::DNS::CreateRecord.new, + :parser => Fog::Parsers::DNS::Bluebox::CreateRecord.new, :path => "/api/domains/#{zone_id}/records.xml" ) end diff --git a/lib/fog/dns/requests/bluebox/create_zone.rb b/lib/fog/dns/requests/bluebox/create_zone.rb index 50a8e5ddd..9014353e6 100644 --- a/lib/fog/dns/requests/bluebox/create_zone.rb +++ b/lib/fog/dns/requests/bluebox/create_zone.rb @@ -1,6 +1,6 @@ module Fog - module Bluebox - class DNS + module DNS + class Bluebox class Real require 'fog/dns/parsers/bluebox/create_zone' @@ -33,7 +33,7 @@ module Fog :body => body, :expects => 202, :method => 'POST', - :parser => Fog::Parsers::Bluebox::DNS::CreateZone.new, + :parser => Fog::Parsers::DNS::Bluebox::CreateZone.new, :path => "/api/domains.xml" ) end diff --git a/lib/fog/dns/requests/bluebox/delete_record.rb b/lib/fog/dns/requests/bluebox/delete_record.rb index eead95ad9..f604447da 100644 --- a/lib/fog/dns/requests/bluebox/delete_record.rb +++ b/lib/fog/dns/requests/bluebox/delete_record.rb @@ -1,6 +1,6 @@ module Fog - module Bluebox - class DNS + module DNS + class Bluebox class Real # Delete a record from the specified DNS zone diff --git a/lib/fog/dns/requests/bluebox/delete_zone.rb b/lib/fog/dns/requests/bluebox/delete_zone.rb index f6ac37270..b0882ebb2 100644 --- a/lib/fog/dns/requests/bluebox/delete_zone.rb +++ b/lib/fog/dns/requests/bluebox/delete_zone.rb @@ -1,6 +1,6 @@ module Fog - module Bluebox - class DNS + module DNS + class Bluebox class Real # Delete a zone from DNS diff --git a/lib/fog/dns/requests/bluebox/get_record.rb b/lib/fog/dns/requests/bluebox/get_record.rb index fca904080..2e15000de 100644 --- a/lib/fog/dns/requests/bluebox/get_record.rb +++ b/lib/fog/dns/requests/bluebox/get_record.rb @@ -1,6 +1,6 @@ module Fog - module Bluebox - class DNS + module DNS + class Bluebox class Real require 'fog/dns/parsers/bluebox/get_record' @@ -21,7 +21,7 @@ module Fog request( :expects => 200, :method => 'GET', - :parser => Fog::Parsers::Bluebox::DNS::GetRecord.new, + :parser => Fog::Parsers::DNS::Bluebox::GetRecord.new, :path => "/api/domains/#{zone_id}/records/#{record_id}.xml" ) end diff --git a/lib/fog/dns/requests/bluebox/get_records.rb b/lib/fog/dns/requests/bluebox/get_records.rb index 186638e3f..e709d8311 100644 --- a/lib/fog/dns/requests/bluebox/get_records.rb +++ b/lib/fog/dns/requests/bluebox/get_records.rb @@ -1,6 +1,6 @@ module Fog - module Bluebox - class DNS + module DNS + class Bluebox class Real require 'fog/dns/parsers/bluebox/get_records' @@ -22,7 +22,7 @@ module Fog request( :expects => 200, :method => 'GET', - :parser => Fog::Parsers::Bluebox::DNS::GetRecords.new, + :parser => Fog::Parsers::DNS::Bluebox::GetRecords.new, :path => "/api/domains/#{zone_id}/records.xml" ) end diff --git a/lib/fog/dns/requests/bluebox/get_zone.rb b/lib/fog/dns/requests/bluebox/get_zone.rb index b98086cfb..8438492ea 100644 --- a/lib/fog/dns/requests/bluebox/get_zone.rb +++ b/lib/fog/dns/requests/bluebox/get_zone.rb @@ -1,6 +1,6 @@ module Fog - module Bluebox - class DNS + module DNS + class Bluebox class Real require 'fog/dns/parsers/bluebox/get_zone' @@ -25,7 +25,7 @@ module Fog request( :expects => 200, :method => 'GET', - :parser => Fog::Parsers::Bluebox::DNS::GetZone.new, + :parser => Fog::Parsers::DNS::Bluebox::GetZone.new, :path => "/api/domains/#{zone_id}.xml" ) end diff --git a/lib/fog/dns/requests/bluebox/get_zones.rb b/lib/fog/dns/requests/bluebox/get_zones.rb index 9f7750890..eb1e463f1 100644 --- a/lib/fog/dns/requests/bluebox/get_zones.rb +++ b/lib/fog/dns/requests/bluebox/get_zones.rb @@ -1,6 +1,6 @@ module Fog - module Bluebox - class DNS + module DNS + class Bluebox class Real require 'fog/dns/parsers/bluebox/get_zones' @@ -24,7 +24,7 @@ module Fog request( :expects => 200, :method => 'GET', - :parser => Fog::Parsers::Bluebox::DNS::GetZones.new, + :parser => Fog::Parsers::DNS::Bluebox::GetZones.new, :path => '/api/domains.xml' ) end diff --git a/lib/fog/dns/requests/bluebox/update_zone.rb b/lib/fog/dns/requests/bluebox/update_zone.rb index 51438ae90..aaab9075d 100644 --- a/lib/fog/dns/requests/bluebox/update_zone.rb +++ b/lib/fog/dns/requests/bluebox/update_zone.rb @@ -1,6 +1,6 @@ module Fog - module Bluebox - class DNS + module DNS + class Bluebox class Real # Updates an existing DNS zone diff --git a/lib/fog/dns/requests/dnsimple/create_domain.rb b/lib/fog/dns/requests/dnsimple/create_domain.rb index 0219599bd..a0caba17c 100644 --- a/lib/fog/dns/requests/dnsimple/create_domain.rb +++ b/lib/fog/dns/requests/dnsimple/create_domain.rb @@ -1,6 +1,6 @@ module Fog - module DNSimple - class DNS + module DNS + class DNSimple class Real # Create a single domain in DNSimple in your account. diff --git a/lib/fog/dns/requests/dnsimple/create_record.rb b/lib/fog/dns/requests/dnsimple/create_record.rb index e3e2c7a8e..a6bc78d25 100644 --- a/lib/fog/dns/requests/dnsimple/create_record.rb +++ b/lib/fog/dns/requests/dnsimple/create_record.rb @@ -1,6 +1,6 @@ module Fog - module DNSimple - class DNS + module DNS + class DNSimple class Real # Create a new host in the specified zone diff --git a/lib/fog/dns/requests/dnsimple/delete_domain.rb b/lib/fog/dns/requests/dnsimple/delete_domain.rb index 04e8eb9b9..42ef3973c 100644 --- a/lib/fog/dns/requests/dnsimple/delete_domain.rb +++ b/lib/fog/dns/requests/dnsimple/delete_domain.rb @@ -1,6 +1,6 @@ module Fog - module DNSimple - class DNS + module DNS + class DNSimple class Real # Delete the given domain from your account. You may use diff --git a/lib/fog/dns/requests/dnsimple/delete_record.rb b/lib/fog/dns/requests/dnsimple/delete_record.rb index 2d9b0e59e..beaf8103e 100644 --- a/lib/fog/dns/requests/dnsimple/delete_record.rb +++ b/lib/fog/dns/requests/dnsimple/delete_record.rb @@ -1,6 +1,6 @@ module Fog - module DNSimple - class DNS + module DNS + class DNSimple class Real # Delete the record with the given ID for the given domain. diff --git a/lib/fog/dns/requests/dnsimple/get_domain.rb b/lib/fog/dns/requests/dnsimple/get_domain.rb index 6989cebd3..cb42f8271 100644 --- a/lib/fog/dns/requests/dnsimple/get_domain.rb +++ b/lib/fog/dns/requests/dnsimple/get_domain.rb @@ -1,6 +1,6 @@ module Fog - module DNSimple - class DNS + module DNS + class DNSimple class Real # Get the details for a specific domain in your account. You diff --git a/lib/fog/dns/requests/dnsimple/get_record.rb b/lib/fog/dns/requests/dnsimple/get_record.rb index 06eed804e..2c9167a72 100644 --- a/lib/fog/dns/requests/dnsimple/get_record.rb +++ b/lib/fog/dns/requests/dnsimple/get_record.rb @@ -1,6 +1,6 @@ module Fog - module DNSimple - class DNS + module DNS + class DNSimple class Real # Gets record from given domain. diff --git a/lib/fog/dns/requests/dnsimple/list_domains.rb b/lib/fog/dns/requests/dnsimple/list_domains.rb index 15aedf10c..696515a97 100644 --- a/lib/fog/dns/requests/dnsimple/list_domains.rb +++ b/lib/fog/dns/requests/dnsimple/list_domains.rb @@ -1,6 +1,6 @@ module Fog - module DNSimple - class DNS + module DNS + class DNSimple class Real # Get the details for a specific domain in your account. You diff --git a/lib/fog/dns/requests/dnsimple/list_records.rb b/lib/fog/dns/requests/dnsimple/list_records.rb index 5eb470d6f..c44651c23 100644 --- a/lib/fog/dns/requests/dnsimple/list_records.rb +++ b/lib/fog/dns/requests/dnsimple/list_records.rb @@ -1,6 +1,6 @@ module Fog - module DNSimple - class DNS + module DNS + class DNSimple class Real # Get the list of records for the specific domain. diff --git a/lib/fog/dns/requests/dnsimple/update_record.rb b/lib/fog/dns/requests/dnsimple/update_record.rb index 4d2317cff..f2c9af52e 100644 --- a/lib/fog/dns/requests/dnsimple/update_record.rb +++ b/lib/fog/dns/requests/dnsimple/update_record.rb @@ -1,6 +1,6 @@ module Fog - module DNSimple - class DNS + module DNS + class DNSimple class Real # Update the given record for the given domain. diff --git a/lib/fog/dns/requests/dnsmadeeasy/create_domain.rb b/lib/fog/dns/requests/dnsmadeeasy/create_domain.rb index 9ec57eff8..c0277cde1 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/create_domain.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/create_domain.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Creates a domain entry with the specified name. Returns errors if name is not valid or conflicts with another domain. diff --git a/lib/fog/dns/requests/dnsmadeeasy/create_record.rb b/lib/fog/dns/requests/dnsmadeeasy/create_record.rb index 32c4ad854..7fd26f72d 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/create_record.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/create_record.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Creates a record with the representation specified in the request content. Returns errors if record is not valid. diff --git a/lib/fog/dns/requests/dnsmadeeasy/create_secondary.rb b/lib/fog/dns/requests/dnsmadeeasy/create_secondary.rb index 62294464a..42e6628b2 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/create_secondary.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/create_secondary.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Creates a secondary entry with the specified name. Returns errors if name is not valid or conflicts with another domain. diff --git a/lib/fog/dns/requests/dnsmadeeasy/delete_all_domains.rb b/lib/fog/dns/requests/dnsmadeeasy/delete_all_domains.rb index cf9cd6333..c8737ae05 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/delete_all_domains.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/delete_all_domains.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Deletes all domains for your account. diff --git a/lib/fog/dns/requests/dnsmadeeasy/delete_all_secondary.rb b/lib/fog/dns/requests/dnsmadeeasy/delete_all_secondary.rb index e55c5d867..063fb4eb6 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/delete_all_secondary.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/delete_all_secondary.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Deletes all secondary entries for your account. diff --git a/lib/fog/dns/requests/dnsmadeeasy/delete_domain.rb b/lib/fog/dns/requests/dnsmadeeasy/delete_domain.rb index 3b08688fc..82746eb30 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/delete_domain.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/delete_domain.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Delete the given domain from your account. diff --git a/lib/fog/dns/requests/dnsmadeeasy/delete_record.rb b/lib/fog/dns/requests/dnsmadeeasy/delete_record.rb index 4f82cd05c..2116f74e1 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/delete_record.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/delete_record.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Deletes the record with the specified id. Note that records are not modifiable for domains that are locked to a template. diff --git a/lib/fog/dns/requests/dnsmadeeasy/delete_secondary.rb b/lib/fog/dns/requests/dnsmadeeasy/delete_secondary.rb index 355167b20..239cdef16 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/delete_secondary.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/delete_secondary.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Deletes the specified secondary entry. diff --git a/lib/fog/dns/requests/dnsmadeeasy/get_domain.rb b/lib/fog/dns/requests/dnsmadeeasy/get_domain.rb index 075178cb8..481a9d627 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/get_domain.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/get_domain.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Get the details for a specific domain in your account. diff --git a/lib/fog/dns/requests/dnsmadeeasy/get_record.rb b/lib/fog/dns/requests/dnsmadeeasy/get_record.rb index a3f78ed22..b5117a045 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/get_record.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/get_record.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Returns a record object representing the record with the specified id. diff --git a/lib/fog/dns/requests/dnsmadeeasy/get_secondary.rb b/lib/fog/dns/requests/dnsmadeeasy/get_secondary.rb index 11f83afe6..830e4b703 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/get_secondary.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/get_secondary.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Returns the secondary entry object representation of the specified secondary entry. diff --git a/lib/fog/dns/requests/dnsmadeeasy/list_domains.rb b/lib/fog/dns/requests/dnsmadeeasy/list_domains.rb index d433e4b39..5409fba41 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/list_domains.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/list_domains.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Returns a list of all domain names for your account. diff --git a/lib/fog/dns/requests/dnsmadeeasy/list_records.rb b/lib/fog/dns/requests/dnsmadeeasy/list_records.rb index c9f204130..b5b31ebd6 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/list_records.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/list_records.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Returns a list of record objects containing all records for the specified domain diff --git a/lib/fog/dns/requests/dnsmadeeasy/list_secondary.rb b/lib/fog/dns/requests/dnsmadeeasy/list_secondary.rb index 32c8c7966..177cc4365 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/list_secondary.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/list_secondary.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Returns a list of all secondary entry names for your account. diff --git a/lib/fog/dns/requests/dnsmadeeasy/update_record.rb b/lib/fog/dns/requests/dnsmadeeasy/update_record.rb index 3619ea939..b7f61f23d 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/update_record.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/update_record.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Updates a record with the representation specified in the request content. Returns errors if record is not valid. diff --git a/lib/fog/dns/requests/dnsmadeeasy/update_secondary.rb b/lib/fog/dns/requests/dnsmadeeasy/update_secondary.rb index eb9b32677..50ca05ca0 100644 --- a/lib/fog/dns/requests/dnsmadeeasy/update_secondary.rb +++ b/lib/fog/dns/requests/dnsmadeeasy/update_secondary.rb @@ -1,6 +1,6 @@ module Fog - module DNSMadeEasy - class DNS + module DNS + class DNSMadeEasy class Real # Modifies a secondary entry with the specified name. Returns errors if name is not valid or conflicts with another domain. diff --git a/lib/fog/dns/requests/linode/domain_create.rb b/lib/fog/dns/requests/linode/domain_create.rb index 35ffea26c..cf661e4cd 100644 --- a/lib/fog/dns/requests/linode/domain_create.rb +++ b/lib/fog/dns/requests/linode/domain_create.rb @@ -1,6 +1,6 @@ module Fog - module Linode - class DNS + module DNS + class Linode class Real # Creates a domain record diff --git a/lib/fog/dns/requests/linode/domain_delete.rb b/lib/fog/dns/requests/linode/domain_delete.rb index 8248e68f0..47ec126c1 100644 --- a/lib/fog/dns/requests/linode/domain_delete.rb +++ b/lib/fog/dns/requests/linode/domain_delete.rb @@ -1,6 +1,6 @@ module Fog - module Linode - class DNS + module DNS + class Linode class Real # Delete the given domain from the list Linode hosts diff --git a/lib/fog/dns/requests/linode/domain_list.rb b/lib/fog/dns/requests/linode/domain_list.rb index 76fb78ba8..a06786473 100644 --- a/lib/fog/dns/requests/linode/domain_list.rb +++ b/lib/fog/dns/requests/linode/domain_list.rb @@ -1,6 +1,6 @@ module Fog - module Linode - class DNS + module DNS + class Linode class Real # List of domains (you have access to) diff --git a/lib/fog/dns/requests/linode/domain_resource_create.rb b/lib/fog/dns/requests/linode/domain_resource_create.rb index c649e5c9d..2e875a4e6 100644 --- a/lib/fog/dns/requests/linode/domain_resource_create.rb +++ b/lib/fog/dns/requests/linode/domain_resource_create.rb @@ -1,6 +1,6 @@ module Fog - module Linode - class DNS + module DNS + class Linode class Real # Creates a resource record in a domain diff --git a/lib/fog/dns/requests/linode/domain_resource_delete.rb b/lib/fog/dns/requests/linode/domain_resource_delete.rb index ea619a485..40de20465 100644 --- a/lib/fog/dns/requests/linode/domain_resource_delete.rb +++ b/lib/fog/dns/requests/linode/domain_resource_delete.rb @@ -1,6 +1,6 @@ module Fog - module Linode - class DNS + module DNS + class Linode class Real # Delete the given resource from a domain diff --git a/lib/fog/dns/requests/linode/domain_resource_list.rb b/lib/fog/dns/requests/linode/domain_resource_list.rb index 627262da7..50097e478 100644 --- a/lib/fog/dns/requests/linode/domain_resource_list.rb +++ b/lib/fog/dns/requests/linode/domain_resource_list.rb @@ -1,6 +1,6 @@ module Fog - module Linode - class DNS + module DNS + class Linode class Real # List of resource records for a domain diff --git a/lib/fog/dns/requests/linode/domain_resource_update.rb b/lib/fog/dns/requests/linode/domain_resource_update.rb index cc8e8eb70..cda9053dc 100644 --- a/lib/fog/dns/requests/linode/domain_resource_update.rb +++ b/lib/fog/dns/requests/linode/domain_resource_update.rb @@ -1,6 +1,6 @@ module Fog - module Linode - class DNS + module DNS + class Linode class Real # Updates a resource record in a domain diff --git a/lib/fog/dns/requests/linode/domain_update.rb b/lib/fog/dns/requests/linode/domain_update.rb index c67992330..93737b555 100644 --- a/lib/fog/dns/requests/linode/domain_update.rb +++ b/lib/fog/dns/requests/linode/domain_update.rb @@ -1,6 +1,6 @@ module Fog - module Linode - class DNS + module DNS + class Linode class Real # Update a domain record diff --git a/lib/fog/dns/requests/slicehost/create_record.rb b/lib/fog/dns/requests/slicehost/create_record.rb index 7c9fdbfb4..593179af3 100644 --- a/lib/fog/dns/requests/slicehost/create_record.rb +++ b/lib/fog/dns/requests/slicehost/create_record.rb @@ -1,6 +1,6 @@ module Fog - module Slicehost - class DNS + module DNS + class Slicehost class Real require 'fog/dns/parsers/slicehost/create_record' @@ -41,7 +41,7 @@ module Fog :body => %Q{#{record_type}#{zone_id}#{name}#{data}#{optional_tags}}, :expects => 201, :method => 'POST', - :parser => Fog::Parsers::Slicehost::DNS::CreateRecord.new, + :parser => Fog::Parsers::DNS::Slicehost::CreateRecord.new, :path => 'records.xml' ) end diff --git a/lib/fog/dns/requests/slicehost/create_zone.rb b/lib/fog/dns/requests/slicehost/create_zone.rb index ed8966d41..1ef683bde 100644 --- a/lib/fog/dns/requests/slicehost/create_zone.rb +++ b/lib/fog/dns/requests/slicehost/create_zone.rb @@ -1,6 +1,6 @@ module Fog - module Slicehost - class DNS + module DNS + class Slicehost class Real require 'fog/dns/parsers/slicehost/create_zone' @@ -35,7 +35,7 @@ module Fog :body => %Q{#{origin}#{optional_tags}}, :expects => 201, :method => 'POST', - :parser => Fog::Parsers::Slicehost::DNS::CreateZone.new, + :parser => Fog::Parsers::DNS::Slicehost::CreateZone.new, :path => 'zones.xml' ) end diff --git a/lib/fog/dns/requests/slicehost/delete_record.rb b/lib/fog/dns/requests/slicehost/delete_record.rb index dd16552cf..d428fc2b3 100644 --- a/lib/fog/dns/requests/slicehost/delete_record.rb +++ b/lib/fog/dns/requests/slicehost/delete_record.rb @@ -1,6 +1,6 @@ module Fog - module Slicehost - class DNS + module DNS + class Slicehost class Real # Delete a record from the specified DNS zone diff --git a/lib/fog/dns/requests/slicehost/delete_zone.rb b/lib/fog/dns/requests/slicehost/delete_zone.rb index 2be847db9..2bec40a6c 100644 --- a/lib/fog/dns/requests/slicehost/delete_zone.rb +++ b/lib/fog/dns/requests/slicehost/delete_zone.rb @@ -1,6 +1,6 @@ module Fog - module Slicehost - class DNS + module DNS + class Slicehost class Real # Delete a zone from Slicehost's DNS diff --git a/lib/fog/dns/requests/slicehost/get_record.rb b/lib/fog/dns/requests/slicehost/get_record.rb index bb366d936..599313190 100644 --- a/lib/fog/dns/requests/slicehost/get_record.rb +++ b/lib/fog/dns/requests/slicehost/get_record.rb @@ -1,6 +1,6 @@ module Fog - module Slicehost - class DNS + module DNS + class Slicehost class Real require 'fog/dns/parsers/slicehost/get_record' @@ -21,7 +21,7 @@ module Fog request( :expects => 200, :method => 'GET', - :parser => Fog::Parsers::Slicehost::DNS::GetRecords.new, + :parser => Fog::Parsers::DNS::Slicehost::GetRecords.new, :path => "records/#{record_id}.xml" ) end diff --git a/lib/fog/dns/requests/slicehost/get_records.rb b/lib/fog/dns/requests/slicehost/get_records.rb index 092eb8e4b..c3708ceff 100644 --- a/lib/fog/dns/requests/slicehost/get_records.rb +++ b/lib/fog/dns/requests/slicehost/get_records.rb @@ -1,6 +1,6 @@ module Fog - module Slicehost - class DNS + module DNS + class Slicehost class Real require 'fog/dns/parsers/slicehost/get_records' @@ -22,7 +22,7 @@ module Fog request( :expects => 200, :method => 'GET', - :parser => Fog::Parsers::Slicehost::DNS::GetRecords.new, + :parser => Fog::Parsers::DNS::Slicehost::GetRecords.new, :path => "records.xml" ) end diff --git a/lib/fog/dns/requests/slicehost/get_zone.rb b/lib/fog/dns/requests/slicehost/get_zone.rb index aafada1c4..82f27d28f 100644 --- a/lib/fog/dns/requests/slicehost/get_zone.rb +++ b/lib/fog/dns/requests/slicehost/get_zone.rb @@ -1,6 +1,6 @@ module Fog - module Slicehost - class DNS + module DNS + class Slicehost class Real require 'fog/dns/parsers/slicehost/get_zone' @@ -21,7 +21,7 @@ module Fog request( :expects => 200, :method => 'GET', - :parser => Fog::Parsers::Slicehost::DNS::GetZone.new, + :parser => Fog::Parsers::DNS::Slicehost::GetZone.new, :path => "/zones/#{zone_id}.xml" ) end diff --git a/lib/fog/dns/requests/slicehost/get_zones.rb b/lib/fog/dns/requests/slicehost/get_zones.rb index 0ece445e1..06f32f93d 100644 --- a/lib/fog/dns/requests/slicehost/get_zones.rb +++ b/lib/fog/dns/requests/slicehost/get_zones.rb @@ -1,6 +1,6 @@ module Fog - module Slicehost - class DNS + module DNS + class Slicehost class Real require 'fog/dns/parsers/slicehost/get_zones' @@ -19,7 +19,7 @@ module Fog request( :expects => 200, :method => 'GET', - :parser => Fog::Parsers::Slicehost::DNS::GetZones.new, + :parser => Fog::Parsers::DNS::Slicehost::GetZones.new, :path => 'zones.xml' ) end diff --git a/lib/fog/dns/requests/zerigo/count_hosts.rb b/lib/fog/dns/requests/zerigo/count_hosts.rb index dca1c7f2b..20b5d77ed 100644 --- a/lib/fog/dns/requests/zerigo/count_hosts.rb +++ b/lib/fog/dns/requests/zerigo/count_hosts.rb @@ -1,6 +1,6 @@ module Fog - module Zerigo - class DNS + module DNS + class Zerigo class Real require 'fog/dns/parsers/zerigo/count_hosts' @@ -17,7 +17,7 @@ module Fog request( :expects => 200, :method => 'GET', - :parser => Fog::Parsers::Zerigo::DNS::CountHosts.new, + :parser => Fog::Parsers::DNS::Zerigo::CountHosts.new, :path => "/api/1.1/zones/#{zone_id}/hosts/count.xml" ) end diff --git a/lib/fog/dns/requests/zerigo/count_zones.rb b/lib/fog/dns/requests/zerigo/count_zones.rb index 4412d6a54..a423949e4 100644 --- a/lib/fog/dns/requests/zerigo/count_zones.rb +++ b/lib/fog/dns/requests/zerigo/count_zones.rb @@ -1,6 +1,6 @@ module Fog - module Zerigo - class DNS + module DNS + class Zerigo class Real require 'fog/dns/parsers/zerigo/count_zones' @@ -17,7 +17,7 @@ module Fog request( :expects => 200, :method => 'GET', - :parser => Fog::Parsers::Zerigo::DNS::CountZones.new, + :parser => Fog::Parsers::DNS::Zerigo::CountZones.new, :path => "/api/1.1/zones/count.xml" ) end diff --git a/lib/fog/dns/requests/zerigo/create_host.rb b/lib/fog/dns/requests/zerigo/create_host.rb index 181373cf1..d141fa6e8 100644 --- a/lib/fog/dns/requests/zerigo/create_host.rb +++ b/lib/fog/dns/requests/zerigo/create_host.rb @@ -1,6 +1,6 @@ module Fog - module Zerigo - class DNS + module DNS + class Zerigo class Real require 'fog/dns/parsers/zerigo/create_host' @@ -51,7 +51,7 @@ module Fog :body => %Q{#{host_type}#{data}#{optional_tags}}, :expects => 201, :method => 'POST', - :parser => Fog::Parsers::Zerigo::DNS::CreateHost.new, + :parser => Fog::Parsers::DNS::Zerigo::CreateHost.new, :path => "/api/1.1/zones/#{zone_id}/hosts.xml" ) end diff --git a/lib/fog/dns/requests/zerigo/create_zone.rb b/lib/fog/dns/requests/zerigo/create_zone.rb index 59af11220..a0251182a 100644 --- a/lib/fog/dns/requests/zerigo/create_zone.rb +++ b/lib/fog/dns/requests/zerigo/create_zone.rb @@ -1,6 +1,6 @@ module Fog - module Zerigo - class DNS + module DNS + class Zerigo class Real require 'fog/dns/parsers/zerigo/create_zone' @@ -78,7 +78,7 @@ module Fog :body => %Q{#{domain}#{default_ttl}#{ns_type}#{optional_tags}}, :expects => 201, :method => 'POST', - :parser => Fog::Parsers::Zerigo::DNS::CreateZone.new, + :parser => Fog::Parsers::DNS::Zerigo::CreateZone.new, :path => '/api/1.1/zones.xml' ) end diff --git a/lib/fog/dns/requests/zerigo/delete_host.rb b/lib/fog/dns/requests/zerigo/delete_host.rb index 685ec2902..ab8404dcf 100644 --- a/lib/fog/dns/requests/zerigo/delete_host.rb +++ b/lib/fog/dns/requests/zerigo/delete_host.rb @@ -1,6 +1,6 @@ module Fog - module Zerigo - class DNS + module DNS + class Zerigo class Real # Delete a host record diff --git a/lib/fog/dns/requests/zerigo/delete_zone.rb b/lib/fog/dns/requests/zerigo/delete_zone.rb index c0704705b..da04f0935 100644 --- a/lib/fog/dns/requests/zerigo/delete_zone.rb +++ b/lib/fog/dns/requests/zerigo/delete_zone.rb @@ -1,6 +1,6 @@ module Fog - module Zerigo - class DNS + module DNS + class Zerigo class Real # Delete a zone from Zerigo diff --git a/lib/fog/dns/requests/zerigo/find_hosts.rb b/lib/fog/dns/requests/zerigo/find_hosts.rb index 618043524..07e4d0f9c 100644 --- a/lib/fog/dns/requests/zerigo/find_hosts.rb +++ b/lib/fog/dns/requests/zerigo/find_hosts.rb @@ -1,6 +1,6 @@ module Fog - module Zerigo - class DNS + module DNS + class Zerigo class Real require 'fog/dns/parsers/zerigo/find_hosts' @@ -35,7 +35,7 @@ module Fog request( :expects => 200, :method => 'GET', - :parser => Fog::Parsers::Zerigo::DNS::FindHosts.new, + :parser => Fog::Parsers::DNS::Zerigo::FindHosts.new, :path => "/api/1.1/hosts.xml?fqdn=#{fqdn}" ) else @@ -43,7 +43,7 @@ module Fog request( :expects => 200, :method => 'GET', - :parser => Fog::Parsers::Zerigo::DNS::FindHosts.new, + :parser => Fog::Parsers::DNS::Zerigo::FindHosts.new, :path => "/api/1.1/zones/#{zone_id}/hosts.xml?fqdn=#{fqdn}" ) end diff --git a/lib/fog/dns/requests/zerigo/get_host.rb b/lib/fog/dns/requests/zerigo/get_host.rb index c5334e42a..e9362fcbc 100644 --- a/lib/fog/dns/requests/zerigo/get_host.rb +++ b/lib/fog/dns/requests/zerigo/get_host.rb @@ -1,6 +1,6 @@ module Fog - module Zerigo - class DNS + module DNS + class Zerigo class Real require 'fog/dns/parsers/zerigo/get_host' @@ -28,7 +28,7 @@ module Fog request( :expects => 200, :method => 'GET', - :parser => Fog::Parsers::Zerigo::DNS::GetHost.new, + :parser => Fog::Parsers::DNS::Zerigo::GetHost.new, :path => "/api/1.1/hosts/#{host_id}.xml" ) end diff --git a/lib/fog/dns/requests/zerigo/get_zone.rb b/lib/fog/dns/requests/zerigo/get_zone.rb index 999eacc29..951c440e0 100644 --- a/lib/fog/dns/requests/zerigo/get_zone.rb +++ b/lib/fog/dns/requests/zerigo/get_zone.rb @@ -1,6 +1,6 @@ module Fog - module Zerigo - class DNS + module DNS + class Zerigo class Real require 'fog/dns/parsers/zerigo/get_zone' @@ -38,7 +38,7 @@ module Fog request( :expects => 200, :method => 'GET', - :parser => Fog::Parsers::Zerigo::DNS::GetZone.new, + :parser => Fog::Parsers::DNS::Zerigo::GetZone.new, :path => "/api/1.1/zones/#{zone}.xml" ) end diff --git a/lib/fog/dns/requests/zerigo/update_host.rb b/lib/fog/dns/requests/zerigo/update_host.rb index 75358b3cd..f190512df 100644 --- a/lib/fog/dns/requests/zerigo/update_host.rb +++ b/lib/fog/dns/requests/zerigo/update_host.rb @@ -1,6 +1,6 @@ module Fog - module Zerigo - class DNS + module DNS + class Zerigo class Real # Update a host record diff --git a/lib/fog/dns/requests/zerigo/update_zone.rb b/lib/fog/dns/requests/zerigo/update_zone.rb index a6da77773..daff9828d 100644 --- a/lib/fog/dns/requests/zerigo/update_zone.rb +++ b/lib/fog/dns/requests/zerigo/update_zone.rb @@ -1,6 +1,6 @@ module Fog - module Zerigo - class DNS + module DNS + class Zerigo class Real # Update the parameters of a zone diff --git a/lib/fog/dns/slicehost.rb b/lib/fog/dns/slicehost.rb index de35e2fb5..eea480ec7 100644 --- a/lib/fog/dns/slicehost.rb +++ b/lib/fog/dns/slicehost.rb @@ -1,6 +1,6 @@ module Fog - module Slicehost - class DNS < Fog::Service + module DNS + class Slicehost < Fog::Service requires :slicehost_password recognizes :host, :port, :scheme, :persistent @@ -35,13 +35,6 @@ module Fog end def initialize(options={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::Slicehost::DNS.new is deprecated, use Fog::DNS.new(:provider => 'Slicehost') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - @slicehost_password = options[:slicehost_password] end @@ -58,13 +51,6 @@ module Fog class Real def initialize(options={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::Slicehost::DNS.new is deprecated, use Fog::DNS.new(:provider => 'Slicehost') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - require 'fog/core/parser' @slicehost_password = options[:slicehost_password] @@ -95,7 +81,7 @@ module Fog rescue Excon::Errors::HTTPStatusError => error raise case error when Excon::Errors::NotFound - Fog::Slicehost::DNS::NotFound.slurp(error) + Fog::DNS::Slicehost::NotFound.slurp(error) else error end diff --git a/lib/fog/dns/zerigo.rb b/lib/fog/dns/zerigo.rb index 61eb28fec..8e86d7c05 100644 --- a/lib/fog/dns/zerigo.rb +++ b/lib/fog/dns/zerigo.rb @@ -1,6 +1,6 @@ module Fog - module Zerigo - class DNS < Fog::Service + module DNS + class Zerigo < Fog::Service requires :zerigo_email, :zerigo_token recognizes :timeout, :persistent @@ -41,13 +41,6 @@ module Fog end def initialize(options={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::Zerigo::DNS.new is deprecated, use Fog::DNS.new(:provider => 'Zerigo') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - @zerigo_email = options[:zerigo_email] @zerigo_token = options[:zerigo_token] end @@ -65,13 +58,6 @@ module Fog class Real def initialize(options={}) - unless options.delete(:provider) - location = caller.first - warning = "[yellow][WARN] Fog::Zerigo::DNS.new is deprecated, use Fog::DNS.new(:provider => 'Zerigo') instead[/]" - warning << " [light_black](" << location << ")[/] " - Formatador.display_line(warning) - end - require 'fog/core/parser' @zerigo_email = options[:zerigo_email] @@ -104,7 +90,7 @@ module Fog rescue Excon::Errors::HTTPStatusError => error raise case error when Excon::Errors::NotFound - Fog::Zerigo::DNS::NotFound.slurp(error) + Fog::DNS::Zerigo::NotFound.slurp(error) else error end diff --git a/lib/fog/storage.rb b/lib/fog/storage.rb index a779af276..3e5b0bdcd 100644 --- a/lib/fog/storage.rb +++ b/lib/fog/storage.rb @@ -7,7 +7,7 @@ module Fog def self.new(attributes) attributes = attributes.dup # prevent delete from having side effects - case provider = attributes[:provider].to_s.downcase.to_sym # attributes.delete(:provider) + case provider = attributes[:provider].to_s.downcase.to_sym when :aws require 'fog/storage/aws' Fog::Storage::AWS.new(attributes) diff --git a/tests/dns/helper.rb b/tests/dns/helper.rb index f4dc96a18..d02a8a61c 100644 --- a/tests/dns/helper.rb +++ b/tests/dns/helper.rb @@ -1,30 +1,30 @@ def dns_providers { - AWS => { + :aws => { :mocked => false }, - Bluebox => { + :bluebox => { :mocked => false, :zone_attributes => { :ttl => 60 } }, - Linode => { + :dnsimple => { + :mocked => false + }, + :dnsmadeeasy => { + :mocked => false + }, + :linode => { :mocked => false, :zone_attributes => { :email => 'fog@example.com' } }, - Slicehost => { + :slicehost => { :mocked => false }, - Zerigo => { - :mocked => false - }, - DNSimple => { - :mocked => false - }, - DNSMadeEasy => { + :zerigo => { :mocked => false } } diff --git a/tests/dns/models/record_tests.rb b/tests/dns/models/record_tests.rb index c0a2a1260..99f507210 100644 --- a/tests/dns/models/record_tests.rb +++ b/tests/dns/models/record_tests.rb @@ -1,6 +1,6 @@ for provider, config in dns_providers - Shindo.tests("#{provider}::DNS | record", [provider.to_s.downcase]) do + Shindo.tests("Fog::DNS[:#{provider}] | record", [provider]) do record_attributes = { :name => 'www.fogrecordtests.com', @@ -13,7 +13,7 @@ for provider, config in dns_providers :domain => 'fogrecordtests.com' }.merge(config[:zone_attributes] || {}) - @zone = provider[:dns].zones.create(zone_attributes) + @zone = Fog::DNS[provider].zones.create(zone_attributes) model_tests(@zone.records, record_attributes, config[:mocked]) @zone.destroy diff --git a/tests/dns/models/records_tests.rb b/tests/dns/models/records_tests.rb index c84f9b27c..24aed90d6 100644 --- a/tests/dns/models/records_tests.rb +++ b/tests/dns/models/records_tests.rb @@ -1,6 +1,6 @@ for provider, config in dns_providers - Shindo.tests("#{provider}::DNS | records", [provider.to_s.downcase]) do + Shindo.tests("Fog::DNS[:#{provider}] | records", [provider]) do record_attributes = { :name => 'www.fogrecordstests.com', @@ -13,7 +13,7 @@ for provider, config in dns_providers :domain => 'fogrecordstests.com' }.merge(config[:zone_attributes] || {}) - @zone = provider[:dns].zones.create(zone_attributes) + @zone = Fog::DNS[provider].zones.create(zone_attributes) collection_tests(@zone.records, record_attributes, config[:mocked]) diff --git a/tests/dns/models/zone_tests.rb b/tests/dns/models/zone_tests.rb index dbb1b68fb..58f19767a 100644 --- a/tests/dns/models/zone_tests.rb +++ b/tests/dns/models/zone_tests.rb @@ -1,12 +1,12 @@ for provider, config in dns_providers - Shindo.tests("#{provider}::DNS | zone", [provider.to_s.downcase]) do + Shindo.tests("Fog::DNS[:#{provider}] | zone", [provider]) do zone_attributes = { :domain => 'fogzonetests.com' }.merge!(config[:zone_attributes] || {}) - model_tests(provider[:dns].zones, zone_attributes, config[:mocked]) + model_tests(Fog::DNS[provider].zones, zone_attributes, config[:mocked]) end diff --git a/tests/dns/models/zones_tests.rb b/tests/dns/models/zones_tests.rb index a2a632bf3..0da035d86 100644 --- a/tests/dns/models/zones_tests.rb +++ b/tests/dns/models/zones_tests.rb @@ -1,12 +1,12 @@ for provider, config in dns_providers - Shindo.tests("#{provider}::DNS | zones", [provider.to_s.downcase]) do + Shindo.tests("Fog::DNS[:#{provider}] | zones", [provider]) do zone_attributes = { :domain => 'fogzonestests.com' }.merge!(config[:zone_attributes] || {}) - collection_tests(provider[:dns].zones, zone_attributes, config[:mocked]) + collection_tests(Fog::DNS[provider].zones, zone_attributes, config[:mocked]) end diff --git a/tests/dns/requests/aws/dns_tests.rb b/tests/dns/requests/aws/dns_tests.rb index 28e38fd56..c1cbe964d 100644 --- a/tests/dns/requests/aws/dns_tests.rb +++ b/tests/dns/requests/aws/dns_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('AWS::DNS | DNS requests', ['aws', 'dns']) do +Shindo.tests('Fog::DNS[:aws] | DNS requests', ['aws', 'dns']) do @org_zone_count = 0 @zone_id = '' @@ -18,7 +18,7 @@ Shindo.tests('AWS::DNS | DNS requests', ['aws', 'dns']) do @zone_id = nil - response = AWS[:dns].list_hosted_zones() + response = Fog::DNS[:aws].list_hosted_zones() if response.status == 200 @hosted_zones = response.body['HostedZones'] end @@ -38,7 +38,7 @@ Shindo.tests('AWS::DNS | DNS requests', ['aws', 'dns']) do pending if Fog.mocking? @org_zone_count= 0 - response = AWS[:dns].list_hosted_zones() + response = Fog::DNS[:aws].list_hosted_zones() if response.status == 200 @hosted_zones = response.body['HostedZones'] @org_zone_count = @hosted_zones.count @@ -52,7 +52,7 @@ Shindo.tests('AWS::DNS | DNS requests', ['aws', 'dns']) do result = false - response = AWS[:dns].create_hosted_zone( @test_domain) + response = Fog::DNS[:aws].create_hosted_zone( @test_domain) if response.status == 201 zone= response.body['HostedZone'] @@ -81,7 +81,7 @@ Shindo.tests('AWS::DNS | DNS requests', ['aws', 'dns']) do pending if Fog.mocking? result = false - response = AWS[:dns].get_change(@change_id) + response = Fog::DNS[:aws].get_change(@change_id) if response.status == 200 status = response.body['Status'] if (status == 'PENDING') or (status == 'INSYNC') @@ -97,7 +97,7 @@ Shindo.tests('AWS::DNS | DNS requests', ['aws', 'dns']) do result = false - response = AWS[:dns].get_hosted_zone( @zone_id) + response = Fog::DNS[:aws].get_hosted_zone( @zone_id) if response.status == 200 zone = response.body['HostedZone'] zone_id = zone['Id'] @@ -121,7 +121,7 @@ Shindo.tests('AWS::DNS | DNS requests', ['aws', 'dns']) do result = false - response = AWS[:dns].list_hosted_zones() + response = Fog::DNS[:aws].list_hosted_zones() if response.status == 200 zones= response.body['HostedZones'] @@ -156,7 +156,7 @@ Shindo.tests('AWS::DNS | DNS requests', ['aws', 'dns']) do change_batch = [] change_batch << resource_record_set options = { :comment => 'add A record to domain'} - response = AWS[:dns].change_resource_record_sets( @zone_id, change_batch, options) + response = Fog::DNS[:aws].change_resource_record_sets( @zone_id, change_batch, options) if response.status == 200 change_id = response.body['Id'] status = response.body['Status'] @@ -180,7 +180,7 @@ Shindo.tests('AWS::DNS | DNS requests', ['aws', 'dns']) do change_batch = [] change_batch << resource_record_set options = { :comment => 'add CNAME record to domain'} - response = AWS[:dns].change_resource_record_sets( @zone_id, change_batch, options) + response = Fog::DNS[:aws].change_resource_record_sets( @zone_id, change_batch, options) if response.status == 200 change_id = response.body['Id'] status = response.body['Status'] @@ -204,7 +204,7 @@ Shindo.tests('AWS::DNS | DNS requests', ['aws', 'dns']) do change_batch = [] change_batch << resource_record_set options = { :comment => 'add MX record to domain'} - response = AWS[:dns].change_resource_record_sets( @zone_id, change_batch, options) + response = Fog::DNS[:aws].change_resource_record_sets( @zone_id, change_batch, options) if response.status == 200 change_id = response.body['Id'] status = response.body['Status'] @@ -218,7 +218,7 @@ Shindo.tests('AWS::DNS | DNS requests', ['aws', 'dns']) do pending if Fog.mocking? # get resource records for zone - response = AWS[:dns].list_resource_record_sets( @zone_id) + response = Fog::DNS[:aws].list_resource_record_sets( @zone_id) if response.status == 200 record_sets= response.body['ResourceRecordSets'] num_records= record_sets.count @@ -238,7 +238,7 @@ Shindo.tests('AWS::DNS | DNS requests', ['aws', 'dns']) do change_batch << resource_record_set } options = { :comment => 'remove records from domain'} - response = AWS[:dns].change_resource_record_sets( @zone_id, change_batch, options) + response = Fog::DNS[:aws].change_resource_record_sets( @zone_id, change_batch, options) if response.status != 200 result = false break @@ -250,7 +250,7 @@ Shindo.tests('AWS::DNS | DNS requests', ['aws', 'dns']) do test("delete hosted zone #{@zone_id}") { pending if Fog.mocking? - response = AWS[:dns].delete_hosted_zone( @zone_id) + response = Fog::DNS[:aws].delete_hosted_zone( @zone_id) response.status == 200 } @@ -261,13 +261,13 @@ Shindo.tests('AWS::DNS | DNS requests', ['aws', 'dns']) do tests( 'failure') do tests('create hosted zone using invalid domain name').raises(Excon::Errors::BadRequest) do pending if Fog.mocking? - response = AWS[:dns].create_hosted_zone('invalid-domain') + response = Fog::DNS[:aws].create_hosted_zone('invalid-domain') end tests('get hosted zone using invalid ID').raises(Excon::Errors::Forbidden) do pending if Fog.mocking? zone_id = 'dummy-id' - response = AWS[:dns].get_hosted_zone(zone_id) + response = Fog::DNS[:aws].get_hosted_zone(zone_id) end end diff --git a/tests/dns/requests/bluebox/dns_tests.rb b/tests/dns/requests/bluebox/dns_tests.rb index 803394e00..61c0c8b29 100644 --- a/tests/dns/requests/bluebox/dns_tests.rb +++ b/tests/dns/requests/bluebox/dns_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do +Shindo.tests('Fog::DNS[:bluebox] | DNS requests', ['bluebox', 'dns']) do @domain = '' @new_zones = [] @@ -22,7 +22,7 @@ Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do pending if Fog.mocking? @org_zone_count= 0 - response = Bluebox[:dns].get_zones() + response = Fog::DNS[:bluebox].get_zones() if response.status == 200 zones = response.body['zones'] @org_zone_count = zones.count @@ -35,7 +35,7 @@ Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do pending if Fog.mocking? domain = generate_unique_domain - response = Bluebox[:dns].create_zone(:name => domain, :ttl => 360) + response = Fog::DNS[:bluebox].create_zone(:name => domain, :ttl => 360) if response.status == 202 zone_id = response.body['id'] @new_zones << zone_id @@ -49,7 +49,7 @@ Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do options = { :ttl => 60, :retry => 3600, :refresh => 1800, :minimum => 30 } @domain= generate_unique_domain - response = Bluebox[:dns].create_zone(options.merge(:name => @domain)) + response = Fog::DNS[:bluebox].create_zone(options.merge(:name => @domain)) if response.status == 202 @zone_id = response.body['id'] @new_zones << @zone_id @@ -63,7 +63,7 @@ Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do result = false - response = Bluebox[:dns].get_zone(@zone_id) + response = Fog::DNS[:bluebox].get_zone(@zone_id) if response.status == 200 zone = response.body if (zone['name'] == @domain) and (zone['ttl'] == 60) @@ -79,7 +79,7 @@ Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do result = false - response = Bluebox[:dns].get_zones() + response = Fog::DNS[:bluebox].get_zones() if response.status == 200 zones = response.body['zones'] if (@org_zone_count+2) == zones.count @@ -95,7 +95,7 @@ Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do result= false - response = Bluebox[:dns].get_zones() + response = Fog::DNS[:bluebox].get_zones() if response.status == 200 zones = response.body['zones'] zones.each { |zone| @@ -119,7 +119,7 @@ Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do host= 'www.' + @domain zone_id= @new_zones[1] - response = Bluebox[:dns].create_record(zone_id, 'A', host, '1.2.3.4') + response = Fog::DNS[:bluebox].create_record(zone_id, 'A', host, '1.2.3.4') if response.status == 202 record_id = response.body['id'] @new_records << record_id @@ -133,7 +133,7 @@ Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do host= 'ftp.' + @domain zone_id= @new_zones[1] - response = Bluebox[:dns].create_record( zone_id, 'A', host, '1.2.3.4') + response = Fog::DNS[:bluebox].create_record( zone_id, 'A', host, '1.2.3.4') if response.status == 202 record_id = response.body['id'] @new_records << record_id @@ -146,7 +146,7 @@ Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do pending if Fog.mocking? zone_id= @new_zones[1] - response = Bluebox[:dns].create_record( zone_id, 'CNAME', 'mail', @domain) + response = Fog::DNS[:bluebox].create_record( zone_id, 'CNAME', 'mail', @domain) if response.status == 202 record_id = response.body['id'] @new_records << record_id @@ -160,7 +160,7 @@ Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do ns_domain = 'ns.' + @domain zone_id= @new_zones[1] - response = Bluebox[:dns].create_record( zone_id, 'NS', @domain, ns_domain) + response = Fog::DNS[:bluebox].create_record( zone_id, 'NS', @domain, ns_domain) if response.status == 202 record_id = response.body['id'] @new_records << record_id @@ -174,7 +174,7 @@ Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do mail_domain = 'mail.' + @domain zone_id= @new_zones[1] - response = Bluebox[:dns].create_record( zone_id, 'MX', @domain, mail_domain, :priority => 10) + response = Fog::DNS[:bluebox].create_record( zone_id, 'MX', @domain, mail_domain, :priority => 10) if response.status == 202 @record_id = response.body['id'] @new_records << @record_id @@ -188,7 +188,7 @@ Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do result= false - response = Bluebox[:dns].get_record(@new_zones[1], @record_id) + response = Fog::DNS[:bluebox].get_record(@new_zones[1], @record_id) if response.status == 200 mail_domain = 'mail.' + @domain + "." record = response.body @@ -205,7 +205,7 @@ Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do result= false - response = Bluebox[:dns].get_records(@new_zones[1]) + response = Fog::DNS[:bluebox].get_records(@new_zones[1]) if response.status == 200 records = response.body['records'] @@ -231,7 +231,7 @@ Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do result= true @new_records.each { |record_id| - response = Bluebox[:dns].delete_record(@new_zones[1], record_id) + response = Fog::DNS[:bluebox].delete_record(@new_zones[1], record_id) if response.status != 200 result= false; end @@ -245,7 +245,7 @@ Shindo.tests('Bluebox::dns | DNS requests', ['bluebox', 'dns']) do result= true @new_zones.each { |zone_id| - response = Bluebox[:dns].delete_zone( zone_id) + response = Fog::DNS[:bluebox].delete_zone( zone_id) if response.status != 200 result= false; end diff --git a/tests/dns/requests/dnsimple/dns_tests.rb b/tests/dns/requests/dnsimple/dns_tests.rb index 42014bc66..3f98a4798 100644 --- a/tests/dns/requests/dnsimple/dns_tests.rb +++ b/tests/dns/requests/dnsimple/dns_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('DNSimple::dns | DNS requests', ['dnsimple', 'dns']) do +Shindo.tests('Fog::DNS[:dnsimple] | DNS requests', ['dnsimple', 'dns']) do @domain = '' @domain_count = 0 @@ -20,7 +20,7 @@ Shindo.tests('DNSimple::dns | DNS requests', ['dnsimple', 'dns']) do test("get current domain count") do pending if Fog.mocking? - response = DNSimple[:dns].list_domains() + response = Fog::DNS[:dnsimple].list_domains() if response.status == 200 @domain_count = response.body.size end @@ -32,7 +32,7 @@ Shindo.tests('DNSimple::dns | DNS requests', ['dnsimple', 'dns']) do pending if Fog.mocking? domain = generate_unique_domain - response = DNSimple[:dns].create_domain(domain) + response = Fog::DNS[:dnsimple].create_domain(domain) if response.status == 201 @domain = response.body["domain"] end @@ -43,7 +43,7 @@ Shindo.tests('DNSimple::dns | DNS requests', ['dnsimple', 'dns']) do test("get domain by id") do pending if Fog.mocking? - response = DNSimple[:dns].get_domain(@domain["id"]) + response = Fog::DNS[:dnsimple].get_domain(@domain["id"]) response.status == 200 end @@ -54,7 +54,7 @@ Shindo.tests('DNSimple::dns | DNS requests', ['dnsimple', 'dns']) do name = "www" type = "A" content = "1.2.3.4" - response = DNSimple[:dns].create_record(domain, name, type, content) + response = Fog::DNS[:dnsimple].create_record(domain, name, type, content) if response.status == 201 @record = response.body["record"] @@ -72,7 +72,7 @@ Shindo.tests('DNSimple::dns | DNS requests', ['dnsimple', 'dns']) do type = "MX" content = "mail.#{domain}" options = { :ttl => 60, :prio => 10 } - response = DNSimple[:dns].create_record(domain, name, type, content, options) + response = Fog::DNS[:dnsimple].create_record(domain, name, type, content, options) response.status == 201 end @@ -83,14 +83,14 @@ Shindo.tests('DNSimple::dns | DNS requests', ['dnsimple', 'dns']) do domain = @domain["name"] record_id = @record["id"] options = { :content => "2.3.4.5", :ttl => 600 } - response = DNSimple[:dns].update_record(domain, record_id, options) + response = Fog::DNS[:dnsimple].update_record(domain, record_id, options) response.status == 200 end test("list records") do pending if Fog.mocking? - response = DNSimple[:dns].list_records(@domain["name"]) + response = Fog::DNS[:dnsimple].list_records(@domain["name"]) if response.status == 200 @records = response.body @@ -105,7 +105,7 @@ Shindo.tests('DNSimple::dns | DNS requests', ['dnsimple', 'dns']) do result = true @records.each do |record| - response = DNSimple[:dns].delete_record(domain, record["record"]["id"]) + response = Fog::DNS[:dnsimple].delete_record(domain, record["record"]["id"]) if(response.status != 200) result = false break @@ -118,7 +118,7 @@ Shindo.tests('DNSimple::dns | DNS requests', ['dnsimple', 'dns']) do test("delete domain") do pending if Fog.mocking? - response = DNSimple[:dns].delete_domain(@domain["name"]) + response = Fog::DNS[:dnsimple].delete_domain(@domain["name"]) response.status == 200 end diff --git a/tests/dns/requests/dnsmadeeasy/dns_tests.rb b/tests/dns/requests/dnsmadeeasy/dns_tests.rb index f8424729f..e328365dd 100644 --- a/tests/dns/requests/dnsmadeeasy/dns_tests.rb +++ b/tests/dns/requests/dnsmadeeasy/dns_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('DNSMadeEasy::dns | DNS requests', ['dnsmadeeasy', 'dns']) do +Shindo.tests('Fog::DNS[:dnsmadeeasy] | DNS requests', ['dnsmadeeasy', 'dns']) do @domain = '' @domain_count = 0 @@ -20,7 +20,7 @@ Shindo.tests('DNSMadeEasy::dns | DNS requests', ['dnsmadeeasy', 'dns']) do test("get current domain count") do pending if Fog.mocking? - response = DNSMadeEasy[:dns].list_domains() + response = Fog::DNS[:dnsmadeeasy].list_domains() if response.status == 200 @domain_count = response.body['list'].size end @@ -32,7 +32,7 @@ Shindo.tests('DNSMadeEasy::dns | DNS requests', ['dnsmadeeasy', 'dns']) do pending if Fog.mocking? domain = generate_unique_domain - response = DNSMadeEasy[:dns].create_domain(domain) + response = Fog::DNS[:dnsmadeeasy].create_domain(domain) if response.status == 201 @domain = response.body end @@ -43,7 +43,7 @@ Shindo.tests('DNSMadeEasy::dns | DNS requests', ['dnsmadeeasy', 'dns']) do test("get domain by name") do pending if Fog.mocking? - response = DNSMadeEasy[:dns].get_domain(@domain["name"]) + response = Fog::DNS[:dnsmadeeasy].get_domain(@domain["name"]) response.status == 200 end @@ -54,7 +54,7 @@ Shindo.tests('DNSMadeEasy::dns | DNS requests', ['dnsmadeeasy', 'dns']) do name = "www" type = "A" data = "1.2.3.4" - response = DNSMadeEasy[:dns].create_record(domain, name, type, data) + response = Fog::DNS[:dnsmadeeasy].create_record(domain, name, type, data) if response.status == 201 @record = response.body @@ -72,7 +72,7 @@ Shindo.tests('DNSMadeEasy::dns | DNS requests', ['dnsmadeeasy', 'dns']) do type = "MX" data = "10 mail.#{domain}" options = { :ttl => 60 } - response = DNSMadeEasy[:dns].create_record(domain, name, type, data, options) + response = Fog::DNS[:dnsmadeeasy].create_record(domain, name, type, data, options) response.status == 201 end @@ -84,15 +84,15 @@ Shindo.tests('DNSMadeEasy::dns | DNS requests', ['dnsmadeeasy', 'dns']) do record_id = @record["id"] options = {:name => '', :type => 'A', :data => "2.3.4.5", :ttl => 600} - response = DNSMadeEasy[:dns].update_record(domain, record_id, options) + response = Fog::DNS[:dnsmadeeasy].update_record(domain, record_id, options) response.status == 200 end - test("get record #{@record['id']} - check ip/ttl") do + test("get record - check ip/ttl") do pending if Fog.mocking? - response = DNSMadeEasy[:dns].get_record(@domain["name"], @record['id']) + response = Fog::DNS[:dnsmadeeasy].get_record(@domain["name"], @record['id']) record = response.body result = false @@ -106,7 +106,7 @@ Shindo.tests('DNSMadeEasy::dns | DNS requests', ['dnsmadeeasy', 'dns']) do test("list records") do pending if Fog.mocking? - response = DNSMadeEasy[:dns].list_records(@domain["name"]) + response = Fog::DNS[:dnsmadeeasy].list_records(@domain["name"]) if response.status == 200 @records = response.body @@ -121,7 +121,7 @@ Shindo.tests('DNSMadeEasy::dns | DNS requests', ['dnsmadeeasy', 'dns']) do result = true @records.each do |record| - response = DNSMadeEasy[:dns].delete_record(domain, record["id"]) + response = Fog::DNS[:dnsmadeeasy].delete_record(domain, record["id"]) if(response.status != 200) result = false break @@ -138,7 +138,7 @@ Shindo.tests('DNSMadeEasy::dns | DNS requests', ['dnsmadeeasy', 'dns']) do puts "THIS MOST LIKELY WILL FAIL ON LIVE because it can take while for DNS Made Easy to create a domain/zone, changing the host to api.sandbox.dnsmadeeasy.com should make it work" sleep 10 - response = DNSMadeEasy[:dns].delete_domain(@domain["name"]) + response = Fog::DNS[:dnsmadeeasy].delete_domain(@domain["name"]) response.status == 200 end diff --git a/tests/dns/requests/linode/dns_tests.rb b/tests/dns/requests/linode/dns_tests.rb index 19fec80cb..ccd2ef032 100644 --- a/tests/dns/requests/linode/dns_tests.rb +++ b/tests/dns/requests/linode/dns_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do +Shindo.tests('Fog::DNS[:linode] | DNS requests', ['linode', 'dns']) do @domain = '' @new_zones = [] @@ -22,7 +22,7 @@ Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do pending if Fog.mocking? @org_zone_count= 0 - response = Linode[:dns].domain_list() + response = Fog::DNS[:linode].domain_list() if response.status == 200 zones = response.body['DATA'] @org_zone_count = zones.count @@ -37,7 +37,7 @@ Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do type = 'master' domain= generate_unique_domain options = { :SOA_email => "netops@#{domain}", :description => "Sample-Domain Inc", :status => 0} - response = Linode[:dns].domain_create( domain, type, options) + response = Fog::DNS[:linode].domain_create( domain, type, options) if response.status == 200 @master_zone_id = response.body['DATA']['DomainID'] @new_zones << @master_zone_id @@ -53,7 +53,7 @@ Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do @domain= generate_unique_domain options = { :SOA_email => "netops@#{@domain}", :refresh_sec => 14400, :retry_sec => 3600, :expire_sec => 604800, :ttl_sec => 28800, :status => 0, :master_ips => '1.2.3.4;2.3.4.5' } - response = Linode[:dns].domain_create( @domain, type, options) + response = Fog::DNS[:linode].domain_create( @domain, type, options) if response.status == 200 @slave_zone_id = response.body['DATA']['DomainID'] @new_zones << @slave_zone_id @@ -67,7 +67,7 @@ Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do result= false - response = Linode[:dns].domain_list( @slave_zone_id) + response = Fog::DNS[:linode].domain_list( @slave_zone_id) if response.status == 200 zones = response.body['DATA'] num_zones = zones.count @@ -91,7 +91,7 @@ Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do result= false options = { :ttl_sec => 14400 } - response = Linode[:dns].domain_update( @slave_zone_id, options) + response = Fog::DNS[:linode].domain_update( @slave_zone_id, options) if response.status == 200 result= true end @@ -104,7 +104,7 @@ Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do result= false - response = Linode[:dns].domain_list( @slave_zone_id) + response = Fog::DNS[:linode].domain_list( @slave_zone_id) if response.status == 200 zones = response.body['DATA'] num_zones = zones.count @@ -124,7 +124,7 @@ Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do host= 'www.' + @domain options = { :name => host, :target => '4.5.6.7', :ttl_sec => 3600 } - response = Linode[:dns].domain_resource_create( @master_zone_id, 'A', options) + response = Fog::DNS[:linode].domain_resource_create( @master_zone_id, 'A', options) if response.status == 200 record_id = response.body['DATA']['ResourceID'] @new_records << record_id @@ -138,7 +138,7 @@ Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do host= 'mail' options = { :name => host, :target => 'www.' + @domain } - response = Linode[:dns].domain_resource_create( @master_zone_id, 'CNAME', options) + response = Fog::DNS[:linode].domain_resource_create( @master_zone_id, 'CNAME', options) if response.status == 200 record_id = response.body['DATA']['ResourceID'] @new_records << record_id @@ -151,7 +151,7 @@ Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do pending if Fog.mocking? options = { :name => @domain, :target => 'ns.' + @domain} - response = Linode[:dns].domain_resource_create( @master_zone_id, 'NS', options) + response = Fog::DNS[:linode].domain_resource_create( @master_zone_id, 'NS', options) if response.status == 200 record_id = response.body['DATA']['ResourceID'] @new_records << record_id @@ -164,7 +164,7 @@ Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do pending if Fog.mocking? options = { :target => 'mail.' + @domain, :ttl_sec => 7200, :priority => 5 } - response = Linode[:dns].domain_resource_create( @master_zone_id, 'MX', options) + response = Fog::DNS[:linode].domain_resource_create( @master_zone_id, 'MX', options) if response.status == 200 @record_id = response.body['DATA']['ResourceID'] @new_records << @record_id @@ -179,7 +179,7 @@ Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do result= false domain= 'mail.' + @domain - response = Linode[:dns].domain_resource_list(@master_zone_id, @record_id) + response = Fog::DNS[:linode].domain_resource_list(@master_zone_id, @record_id) if response.status == 200 records= response.body['DATA'] @@ -200,7 +200,7 @@ Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do pending if Fog.mocking? options = { :target => 'mail2.' + @domain } - response = Linode[:dns].domain_resource_update( @master_zone_id, @record_id, options) + response = Fog::DNS[:linode].domain_resource_update( @master_zone_id, @record_id, options) response.status == 200 end @@ -211,7 +211,7 @@ Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do result= false domain= 'mail2.' + @domain - response = Linode[:dns].domain_resource_list(@master_zone_id, @record_id) + response = Fog::DNS[:linode].domain_resource_list(@master_zone_id, @record_id) if response.status == 200 records= response.body['DATA'] @@ -233,7 +233,7 @@ Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do result= true @new_records.each { |record_id| - response = Linode[:dns].domain_resource_delete( @master_zone_id, record_id) + response = Fog::DNS[:linode].domain_resource_delete( @master_zone_id, record_id) if response.status != 200 result= false; end @@ -246,7 +246,7 @@ Shindo.tests('Linode::dns | DNS requests', ['linode', 'dns']) do result= true @new_zones.each { |zone_id| - response = Linode[:dns].domain_delete( zone_id) + response = Fog::DNS[:linode].domain_delete( zone_id) if response.status != 200 result= false; end diff --git a/tests/dns/requests/slicehost/dns_tests.rb b/tests/dns/requests/slicehost/dns_tests.rb index 6c198971e..cda2ba62a 100644 --- a/tests/dns/requests/slicehost/dns_tests.rb +++ b/tests/dns/requests/slicehost/dns_tests.rb @@ -1,4 +1,4 @@ -Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do +Shindo.tests('Fog::DNS[:slicehost] | DNS requests', ['slicehost', 'dns']) do @domain = '' @new_zones = [] @@ -22,7 +22,7 @@ Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do pending if Fog.mocking? @org_zone_count= 0 - response = Slicehost[:dns].get_zones() + response = Fog::DNS[:slicehost].get_zones() if response.status == 200 zones = response.body['zones'] @org_zone_count = zones.count @@ -35,7 +35,7 @@ Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do pending if Fog.mocking? domain = generate_unique_domain( true) - response = Slicehost[:dns].create_zone(domain) + response = Fog::DNS[:slicehost].create_zone(domain) if response.status == 201 zone_id = response.body['id'] @new_zones << zone_id @@ -49,7 +49,7 @@ Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do options = { :ttl => 1800, :active => 'N' } @domain= generate_unique_domain( true) - response = Slicehost[:dns].create_zone( @domain, options) + response = Fog::DNS[:slicehost].create_zone( @domain, options) if response.status == 201 @zone_id = response.body['id'] @new_zones << @zone_id @@ -63,7 +63,7 @@ Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do result= false - response = Slicehost[:dns].get_zone( @zone_id) + response = Fog::DNS[:slicehost].get_zone( @zone_id) if response.status == 200 zone = response.body if (zone['origin'] == @domain) and (zone['ttl'] == 1800) and @@ -80,7 +80,7 @@ Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do result= false - response = Slicehost[:dns].get_zones() + response = Fog::DNS[:slicehost].get_zones() if response.status == 200 zones = response.body['zones'] if (@org_zone_count+2) == zones.count @@ -96,7 +96,7 @@ Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do result= false - response = Slicehost[:dns].get_zones() + response = Fog::DNS[:slicehost].get_zones() if response.status == 200 zones = response.body['zones'] zones.each { |zone| @@ -120,7 +120,7 @@ Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do host= 'www.' + @domain zone_id= @new_zones[1] - response = Slicehost[:dns].create_record( 'A', zone_id, host, '1.2.3.4') + response = Fog::DNS[:slicehost].create_record( 'A', zone_id, host, '1.2.3.4') if response.status == 201 record_id = response.body['id'] @new_records << record_id @@ -135,7 +135,7 @@ Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do host= 'ftp.' + @domain zone_id= @new_zones[1] options = { :ttl => 3600, :active => 'N'} - response = Slicehost[:dns].create_record( 'A', zone_id, host, '1.2.3.4', options) + response = Fog::DNS[:slicehost].create_record( 'A', zone_id, host, '1.2.3.4', options) if response.status == 201 record_id = response.body['id'] @new_records << record_id @@ -148,7 +148,7 @@ Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do pending if Fog.mocking? zone_id= @new_zones[1] - response = Slicehost[:dns].create_record( 'CNAME', zone_id, 'mail', @domain) + response = Fog::DNS[:slicehost].create_record( 'CNAME', zone_id, 'mail', @domain) if response.status == 201 record_id = response.body['id'] @new_records << record_id @@ -163,7 +163,7 @@ Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do ns_domain = 'ns.' + @domain zone_id= @new_zones[1] options = { :ttl => 3600, :active => 'N'} - response = Slicehost[:dns].create_record( 'NS', zone_id, @domain, ns_domain, options) + response = Fog::DNS[:slicehost].create_record( 'NS', zone_id, @domain, ns_domain, options) if response.status == 201 record_id = response.body['id'] @new_records << record_id @@ -178,7 +178,7 @@ Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do mail_domain = 'mail.' + @domain zone_id= @new_zones[1] options = { :ttl => 3600, :active => 'N', :aux => '10'} - response = Slicehost[:dns].create_record( 'MX', zone_id, @domain, mail_domain, options) + response = Fog::DNS[:slicehost].create_record( 'MX', zone_id, @domain, mail_domain, options) if response.status == 201 @record_id = response.body['id'] @new_records << @record_id @@ -192,7 +192,7 @@ Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do result= false - response = Slicehost[:dns].get_record(@record_id) + response = Fog::DNS[:slicehost].get_record(@record_id) if response.status == 200 mail_domain = 'mail.' + @domain record = response.body['records'][0] @@ -211,7 +211,7 @@ Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do result= false - response = Slicehost[:dns].get_records() + response = Fog::DNS[:slicehost].get_records() if response.status == 200 records = response.body['records'] @@ -239,7 +239,7 @@ Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do result= true @new_records.each { |record_id| - response = Slicehost[:dns].delete_record( record_id) + response = Fog::DNS[:slicehost].delete_record( record_id) if response.status != 200 result= false; end @@ -253,7 +253,7 @@ Shindo.tests('Slicehost::dns | DNS requests', ['slicehost', 'dns']) do result= true @new_zones.each { |zone_id| - response = Slicehost[:dns].delete_zone( zone_id) + response = Fog::DNS[:slicehost].delete_zone( zone_id) if response.status != 200 result= false; end diff --git a/tests/dns/requests/zerigo/dns_tests.rb b/tests/dns/requests/zerigo/dns_tests.rb index 1a0923d4c..40b3dc0e5 100644 --- a/tests/dns/requests/zerigo/dns_tests.rb +++ b/tests/dns/requests/zerigo/dns_tests.rb @@ -1,12 +1,12 @@ -Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do +Shindo.tests('Fog::DNS[:zerigo] | DNS requests', ['zerigo', 'dns']) do # tests assume have a free acccount - ie need to limit # of zones to max of 3 - + @domain = '' @org_zone_count = 0 @new_zones = [] @new_records =[] - + def generate_unique_domain( with_trailing_dot = false) #get time (with 1/100th of sec accuracy) #want unique domain name and if provider is fast, this can be called more than once per second @@ -15,18 +15,17 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do if with_trailing_dot domain+= '.' end - + domain end - - + tests( 'success') do test('get current zone count') do pending if Fog.mocking? @org_zone_count= 0 - response = Zerigo[:dns].count_zones() + response = Fog::DNS[:zerigo].count_zones() if response.status == 200 @org_zone_count = response.body['count'] end @@ -39,11 +38,11 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do options = { :nx_ttl => 1800 } domain = generate_unique_domain - response = Zerigo[:dns].create_zone( domain, 3600, 'pri_sec', options) + response = Fog::DNS[:zerigo].create_zone( domain, 3600, 'pri_sec', options) if response.status == 201 zone_id = response.body['id'] #worked so can now delete - response = Zerigo[:dns].delete_zone( zone_id) + response = Fog::DNS[:zerigo].delete_zone( zone_id) end response.status == 200 @@ -54,11 +53,11 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do options = { :active => 'N', :ns1=> '2.3.4.5' } domain= generate_unique_domain - response = Zerigo[:dns].create_zone( domain, 14400, 'sec', options ) + response = Fog::DNS[:zerigo].create_zone( domain, 14400, 'sec', options ) if response.status == 201 zone_id = response.body['id'] #worked so can now delete - response = Zerigo[:dns].delete_zone( zone_id) + response = Fog::DNS[:zerigo].delete_zone( zone_id) end response.status == 200 @@ -69,11 +68,11 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do domain= generate_unique_domain options = { :active => 'N', :slave_nameservers=> "ns1.#{domain},ns2.#{domain}" } - response = Zerigo[:dns].create_zone( domain, 14400, 'pri', options ) + response = Fog::DNS[:zerigo].create_zone( domain, 14400, 'pri', options ) if response.status == 201 zone_id = response.body['id'] #worked so can now delete - response = Zerigo[:dns].delete_zone( zone_id) + response = Fog::DNS[:zerigo].delete_zone( zone_id) end response.status == 200 @@ -85,7 +84,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do @domain = generate_unique_domain options = { :nx_ttl => 1800, :active => 'N', :hostmaster => "netops@#{@domain}", :notes => 'for client ABC', :tag_list=> 'sample-tag' } - response = Zerigo[:dns].create_zone( @domain, 14400, 'pri', options ) + response = Fog::DNS[:zerigo].create_zone( @domain, 14400, 'pri', options ) if response.status == 201 @zone_id = response.body['id'] @new_zones << @zone_id @@ -99,7 +98,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do result= false - response = Zerigo[:dns].get_zone( @zone_id) + response = Fog::DNS[:zerigo].get_zone( @zone_id) if response.status == 200 zone = response.body if (zone['ns-type'] == 'pri') and (zone['tag-list'] == 'sample-tag') and @@ -118,7 +117,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do pending if Fog.mocking? options = { :notes => 'for client XYZ', :tag_list=> 'testing-tag' } - response = Zerigo[:dns].update_zone( @zone_id, options ) + response = Fog::DNS[:zerigo].update_zone( @zone_id, options ) response.status == 200 end @@ -128,7 +127,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do result= false - response = Zerigo[:dns].get_zone( @zone_id) + response = Fog::DNS[:zerigo].get_zone( @zone_id) if response.status == 200 zone = response.body if (zone['tag-list'] == 'testing-tag') and (zone['notes'] == 'for client XYZ') @@ -144,7 +143,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do result= false - response = Zerigo[:dns].get_zone_stats( @zone_id) + response = Fog::DNS[:zerigo].get_zone_stats( @zone_id) if response.status == 200 zone = response.body if (zone['domain'] == @domain) and (zone['id'] == @zone_id) and @@ -162,7 +161,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do result= false - response = Zerigo[:dns].list_zones() + response = Fog::DNS[:zerigo].list_zones() if response.status == 200 zones = response.body['zones'] if (@org_zone_count+1) == zones.count @@ -178,7 +177,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do host= 'www' options = { :hostname => host } - response = Zerigo[:dns].create_host( @zone_id, 'A', '1.2.3.4', options) + response = Fog::DNS[:zerigo].create_host( @zone_id, 'A', '1.2.3.4', options) if response.status == 201 record_id = response.body['id'] @new_records << record_id @@ -192,7 +191,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do host = 'mail' options = { :hostname => host } - response = Zerigo[:dns].create_host( @zone_id, 'CNAME', @domain, options) + response = Fog::DNS[:zerigo].create_host( @zone_id, 'CNAME', @domain, options) if response.status == 201 record_id = response.body['id'] @new_records << record_id @@ -210,7 +209,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do sub_domain = 'subdomain' # that we want to delete DNS for ns_host = 'ns.' + @domain options = { :hostname => sub_domain} - response = Zerigo[:dns].create_host( @zone_id, 'NS', ns_host, options) + response = Fog::DNS[:zerigo].create_host( @zone_id, 'NS', ns_host, options) if response.status == 201 record_id = response.body['id'] @new_records << record_id @@ -224,7 +223,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do mail_domain = 'mail.' + @domain options = { :hostname => @domain, :ttl => 3600, :priority => '3'} - response = Zerigo[:dns].create_host( @zone_id, 'MX', mail_domain, options) + response = Fog::DNS[:zerigo].create_host( @zone_id, 'MX', mail_domain, options) if response.status == 201 @record_id = response.body['id'] @new_records << @record_id @@ -238,7 +237,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do result = false - response = Zerigo[:dns].get_host( @record_id) + response = Fog::DNS[:zerigo].get_host( @record_id) if response.status == 200 host = response.body if (host['id'] == @record_id) and (host['host-type'] == 'MX') and @@ -256,9 +255,9 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do result = false options = { :priority => 7 } - response = Zerigo[:dns].update_host( @record_id, options) + response = Fog::DNS[:zerigo].update_host( @record_id, options) if response.status == 200 - response = Zerigo[:dns].get_host( @record_id) + response = Fog::DNS[:zerigo].get_host( @record_id) if response.status == 200 host= response.body if (host['priority'] == 7) @@ -274,7 +273,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do pending if Fog.mocking? host_count = 0 - response = Zerigo[:dns].count_hosts( @zone_id) + response = Fog::DNS[:zerigo].count_hosts( @zone_id) if response.status == 200 host_count = response.body['count'] end @@ -287,7 +286,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do result = false - response = Zerigo[:dns].list_hosts( @zone_id) + response = Fog::DNS[:zerigo].list_hosts( @zone_id) if response.status == 200 hosts = response.body['hosts'] if (hosts.count == 4) @@ -309,7 +308,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do result = false host = 'mail.' + @domain - response = Zerigo[:dns].find_hosts( host) + response = Fog::DNS[:zerigo].find_hosts( host) if response.status == 200 hosts = response.body['hosts'] host_count = hosts.count @@ -327,7 +326,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do result = false host = 'mail.' + @domain - response = Zerigo[:dns].find_hosts( host, @zone_id) + response = Fog::DNS[:zerigo].find_hosts( host, @zone_id) if response.status == 200 hosts = response.body['hosts'] host_count = hosts.count @@ -344,7 +343,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do result= true @new_records.each { |record_id| - response = Zerigo[:dns].delete_host( record_id) + response = Fog::DNS[:zerigo].delete_host( record_id) if response.status != 200 result= false; end @@ -358,7 +357,7 @@ Shindo.tests('Zerigo::dns | DNS requests', ['zerigo', 'dns']) do result= true @new_zones.each { |zone_id| - response = Zerigo[:dns].delete_zone( zone_id) + response = Fog::DNS[:zerigo].delete_zone( zone_id) if response.status != 200 result= false; end