From 0763c6370a61d8d8354e9616e44f9695536c8fc4 Mon Sep 17 00:00:00 2001 From: geemus Date: Wed, 24 Aug 2011 14:40:47 -0500 Subject: [PATCH] [dns|zerigo] move zerigo dns to its own shared area (namespacing should probably be corrected) --- lib/fog/dns.rb | 2 +- lib/fog/zerigo.rb | 2 +- lib/fog/{dns/zerigo.rb => zerigo/dns.rb} | 4 ++-- lib/fog/{dns/models/zerigo => zerigo/models/dns}/record.rb | 0 lib/fog/{dns/models/zerigo => zerigo/models/dns}/records.rb | 2 +- lib/fog/{dns/models/zerigo => zerigo/models/dns}/zone.rb | 2 +- lib/fog/{dns/models/zerigo => zerigo/models/dns}/zones.rb | 2 +- .../{dns/parsers/zerigo => zerigo/parsers/dns}/count_hosts.rb | 0 .../{dns/parsers/zerigo => zerigo/parsers/dns}/count_zones.rb | 0 .../{dns/parsers/zerigo => zerigo/parsers/dns}/create_host.rb | 0 .../{dns/parsers/zerigo => zerigo/parsers/dns}/create_zone.rb | 0 .../{dns/parsers/zerigo => zerigo/parsers/dns}/find_hosts.rb | 0 .../{dns/parsers/zerigo => zerigo/parsers/dns}/get_host.rb | 0 .../{dns/parsers/zerigo => zerigo/parsers/dns}/get_zone.rb | 0 .../parsers/zerigo => zerigo/parsers/dns}/get_zone_stats.rb | 0 .../{dns/parsers/zerigo => zerigo/parsers/dns}/list_hosts.rb | 0 .../{dns/parsers/zerigo => zerigo/parsers/dns}/list_zones.rb | 0 .../requests/zerigo => zerigo/requests/dns}/count_hosts.rb | 2 +- .../requests/zerigo => zerigo/requests/dns}/count_zones.rb | 2 +- .../requests/zerigo => zerigo/requests/dns}/create_host.rb | 2 +- .../requests/zerigo => zerigo/requests/dns}/create_zone.rb | 2 +- .../requests/zerigo => zerigo/requests/dns}/delete_host.rb | 0 .../requests/zerigo => zerigo/requests/dns}/delete_zone.rb | 0 .../requests/zerigo => zerigo/requests/dns}/find_hosts.rb | 2 +- .../{dns/requests/zerigo => zerigo/requests/dns}/get_host.rb | 2 +- .../{dns/requests/zerigo => zerigo/requests/dns}/get_zone.rb | 2 +- .../requests/zerigo => zerigo/requests/dns}/get_zone_stats.rb | 2 +- .../requests/zerigo => zerigo/requests/dns}/list_hosts.rb | 2 +- .../requests/zerigo => zerigo/requests/dns}/list_zones.rb | 2 +- .../requests/zerigo => zerigo/requests/dns}/update_host.rb | 0 .../requests/zerigo => zerigo/requests/dns}/update_zone.rb | 0 31 files changed, 17 insertions(+), 17 deletions(-) rename lib/fog/{dns/zerigo.rb => zerigo/dns.rb} (96%) rename lib/fog/{dns/models/zerigo => zerigo/models/dns}/record.rb (100%) rename lib/fog/{dns/models/zerigo => zerigo/models/dns}/records.rb (95%) rename lib/fog/{dns/models/zerigo => zerigo/models/dns}/zone.rb (98%) rename lib/fog/{dns/models/zerigo => zerigo/models/dns}/zones.rb (93%) rename lib/fog/{dns/parsers/zerigo => zerigo/parsers/dns}/count_hosts.rb (100%) rename lib/fog/{dns/parsers/zerigo => zerigo/parsers/dns}/count_zones.rb (100%) rename lib/fog/{dns/parsers/zerigo => zerigo/parsers/dns}/create_host.rb (100%) rename lib/fog/{dns/parsers/zerigo => zerigo/parsers/dns}/create_zone.rb (100%) rename lib/fog/{dns/parsers/zerigo => zerigo/parsers/dns}/find_hosts.rb (100%) rename lib/fog/{dns/parsers/zerigo => zerigo/parsers/dns}/get_host.rb (100%) rename lib/fog/{dns/parsers/zerigo => zerigo/parsers/dns}/get_zone.rb (100%) rename lib/fog/{dns/parsers/zerigo => zerigo/parsers/dns}/get_zone_stats.rb (100%) rename lib/fog/{dns/parsers/zerigo => zerigo/parsers/dns}/list_hosts.rb (100%) rename lib/fog/{dns/parsers/zerigo => zerigo/parsers/dns}/list_zones.rb (100%) rename lib/fog/{dns/requests/zerigo => zerigo/requests/dns}/count_hosts.rb (93%) rename lib/fog/{dns/requests/zerigo => zerigo/requests/dns}/count_zones.rb (92%) rename lib/fog/{dns/requests/zerigo => zerigo/requests/dns}/create_host.rb (97%) rename lib/fog/{dns/requests/zerigo => zerigo/requests/dns}/create_zone.rb (98%) rename lib/fog/{dns/requests/zerigo => zerigo/requests/dns}/delete_host.rb (100%) rename lib/fog/{dns/requests/zerigo => zerigo/requests/dns}/delete_zone.rb (100%) rename lib/fog/{dns/requests/zerigo => zerigo/requests/dns}/find_hosts.rb (96%) rename lib/fog/{dns/requests/zerigo => zerigo/requests/dns}/get_host.rb (95%) rename lib/fog/{dns/requests/zerigo => zerigo/requests/dns}/get_zone.rb (96%) rename lib/fog/{dns/requests/zerigo => zerigo/requests/dns}/get_zone_stats.rb (95%) rename lib/fog/{dns/requests/zerigo => zerigo/requests/dns}/list_hosts.rb (95%) rename lib/fog/{dns/requests/zerigo => zerigo/requests/dns}/list_zones.rb (96%) rename lib/fog/{dns/requests/zerigo => zerigo/requests/dns}/update_host.rb (100%) rename lib/fog/{dns/requests/zerigo => zerigo/requests/dns}/update_zone.rb (100%) diff --git a/lib/fog/dns.rb b/lib/fog/dns.rb index 76f29fe5d..6ecdcd87d 100644 --- a/lib/fog/dns.rb +++ b/lib/fog/dns.rb @@ -30,7 +30,7 @@ module Fog require 'fog/dns/slicehost' Fog::DNS::Slicehost.new(attributes) when :zerigo - require 'fog/dns/zerigo' + require 'fog/zerigo/dns' Fog::DNS::Zerigo.new(attributes) else raise ArgumentError.new("#{provider} is not a recognized dns provider") diff --git a/lib/fog/zerigo.rb b/lib/fog/zerigo.rb index 09ac79c69..596ff8281 100644 --- a/lib/fog/zerigo.rb +++ b/lib/fog/zerigo.rb @@ -5,7 +5,7 @@ module Fog extend Fog::Provider - service(:dns, 'dns/zerigo') + service(:dns, 'zerigo/dns') end end diff --git a/lib/fog/dns/zerigo.rb b/lib/fog/zerigo/dns.rb similarity index 96% rename from lib/fog/dns/zerigo.rb rename to lib/fog/zerigo/dns.rb index a5e924443..6338a576e 100644 --- a/lib/fog/dns/zerigo.rb +++ b/lib/fog/zerigo/dns.rb @@ -5,13 +5,13 @@ module Fog requires :zerigo_email, :zerigo_token recognizes :host, :persistent, :port, :scheme, :timeout - model_path 'fog/dns/models/zerigo' + model_path 'fog/zerigo/models/dns' model :record collection :records model :zone collection :zones - request_path 'fog/dns/requests/zerigo' + request_path 'fog/zerigo/requests/dns' request :count_hosts request :count_zones request :create_host diff --git a/lib/fog/dns/models/zerigo/record.rb b/lib/fog/zerigo/models/dns/record.rb similarity index 100% rename from lib/fog/dns/models/zerigo/record.rb rename to lib/fog/zerigo/models/dns/record.rb diff --git a/lib/fog/dns/models/zerigo/records.rb b/lib/fog/zerigo/models/dns/records.rb similarity index 95% rename from lib/fog/dns/models/zerigo/records.rb rename to lib/fog/zerigo/models/dns/records.rb index c8f8d7d07..d78912976 100644 --- a/lib/fog/dns/models/zerigo/records.rb +++ b/lib/fog/zerigo/models/dns/records.rb @@ -1,5 +1,5 @@ require 'fog/core/collection' -require 'fog/dns/models/zerigo/record' +require 'fog/zerigo/models/dns/record' module Fog module DNS diff --git a/lib/fog/dns/models/zerigo/zone.rb b/lib/fog/zerigo/models/dns/zone.rb similarity index 98% rename from lib/fog/dns/models/zerigo/zone.rb rename to lib/fog/zerigo/models/dns/zone.rb index f9a35a4ac..5f6b69827 100644 --- a/lib/fog/dns/models/zerigo/zone.rb +++ b/lib/fog/zerigo/models/dns/zone.rb @@ -1,5 +1,5 @@ require 'fog/core/model' -require 'fog/dns/models/zerigo/records' +require 'fog/zerigo/models/dns/records' module Fog module DNS diff --git a/lib/fog/dns/models/zerigo/zones.rb b/lib/fog/zerigo/models/dns/zones.rb similarity index 93% rename from lib/fog/dns/models/zerigo/zones.rb rename to lib/fog/zerigo/models/dns/zones.rb index 68c75fae6..c4b12a84e 100644 --- a/lib/fog/dns/models/zerigo/zones.rb +++ b/lib/fog/zerigo/models/dns/zones.rb @@ -1,5 +1,5 @@ require 'fog/core/collection' -require 'fog/dns/models/zerigo/zone' +require 'fog/zerigo/models/dns/zone' module Fog module DNS diff --git a/lib/fog/dns/parsers/zerigo/count_hosts.rb b/lib/fog/zerigo/parsers/dns/count_hosts.rb similarity index 100% rename from lib/fog/dns/parsers/zerigo/count_hosts.rb rename to lib/fog/zerigo/parsers/dns/count_hosts.rb diff --git a/lib/fog/dns/parsers/zerigo/count_zones.rb b/lib/fog/zerigo/parsers/dns/count_zones.rb similarity index 100% rename from lib/fog/dns/parsers/zerigo/count_zones.rb rename to lib/fog/zerigo/parsers/dns/count_zones.rb diff --git a/lib/fog/dns/parsers/zerigo/create_host.rb b/lib/fog/zerigo/parsers/dns/create_host.rb similarity index 100% rename from lib/fog/dns/parsers/zerigo/create_host.rb rename to lib/fog/zerigo/parsers/dns/create_host.rb diff --git a/lib/fog/dns/parsers/zerigo/create_zone.rb b/lib/fog/zerigo/parsers/dns/create_zone.rb similarity index 100% rename from lib/fog/dns/parsers/zerigo/create_zone.rb rename to lib/fog/zerigo/parsers/dns/create_zone.rb diff --git a/lib/fog/dns/parsers/zerigo/find_hosts.rb b/lib/fog/zerigo/parsers/dns/find_hosts.rb similarity index 100% rename from lib/fog/dns/parsers/zerigo/find_hosts.rb rename to lib/fog/zerigo/parsers/dns/find_hosts.rb diff --git a/lib/fog/dns/parsers/zerigo/get_host.rb b/lib/fog/zerigo/parsers/dns/get_host.rb similarity index 100% rename from lib/fog/dns/parsers/zerigo/get_host.rb rename to lib/fog/zerigo/parsers/dns/get_host.rb diff --git a/lib/fog/dns/parsers/zerigo/get_zone.rb b/lib/fog/zerigo/parsers/dns/get_zone.rb similarity index 100% rename from lib/fog/dns/parsers/zerigo/get_zone.rb rename to lib/fog/zerigo/parsers/dns/get_zone.rb diff --git a/lib/fog/dns/parsers/zerigo/get_zone_stats.rb b/lib/fog/zerigo/parsers/dns/get_zone_stats.rb similarity index 100% rename from lib/fog/dns/parsers/zerigo/get_zone_stats.rb rename to lib/fog/zerigo/parsers/dns/get_zone_stats.rb diff --git a/lib/fog/dns/parsers/zerigo/list_hosts.rb b/lib/fog/zerigo/parsers/dns/list_hosts.rb similarity index 100% rename from lib/fog/dns/parsers/zerigo/list_hosts.rb rename to lib/fog/zerigo/parsers/dns/list_hosts.rb diff --git a/lib/fog/dns/parsers/zerigo/list_zones.rb b/lib/fog/zerigo/parsers/dns/list_zones.rb similarity index 100% rename from lib/fog/dns/parsers/zerigo/list_zones.rb rename to lib/fog/zerigo/parsers/dns/list_zones.rb diff --git a/lib/fog/dns/requests/zerigo/count_hosts.rb b/lib/fog/zerigo/requests/dns/count_hosts.rb similarity index 93% rename from lib/fog/dns/requests/zerigo/count_hosts.rb rename to lib/fog/zerigo/requests/dns/count_hosts.rb index 20b5d77ed..5e19769de 100644 --- a/lib/fog/dns/requests/zerigo/count_hosts.rb +++ b/lib/fog/zerigo/requests/dns/count_hosts.rb @@ -3,7 +3,7 @@ module Fog class Zerigo class Real - require 'fog/dns/parsers/zerigo/count_hosts' + require 'fog/zerigo/parsers/dns/count_hosts' # total number of hosts available for the specified zone. It is the same value as provided # in the X-Query-Count header in the list_hosts API method diff --git a/lib/fog/dns/requests/zerigo/count_zones.rb b/lib/fog/zerigo/requests/dns/count_zones.rb similarity index 92% rename from lib/fog/dns/requests/zerigo/count_zones.rb rename to lib/fog/zerigo/requests/dns/count_zones.rb index a423949e4..b1eac98ea 100644 --- a/lib/fog/dns/requests/zerigo/count_zones.rb +++ b/lib/fog/zerigo/requests/dns/count_zones.rb @@ -3,7 +3,7 @@ module Fog class Zerigo class Real - require 'fog/dns/parsers/zerigo/count_zones' + require 'fog/zerigo/parsers/dns/count_zones' # Total number of zones hosted Zerigo for this account. It is the same value as provided # in the X-Query-Count header in the list_zones API method diff --git a/lib/fog/dns/requests/zerigo/create_host.rb b/lib/fog/zerigo/requests/dns/create_host.rb similarity index 97% rename from lib/fog/dns/requests/zerigo/create_host.rb rename to lib/fog/zerigo/requests/dns/create_host.rb index d141fa6e8..4f3eddacd 100644 --- a/lib/fog/dns/requests/zerigo/create_host.rb +++ b/lib/fog/zerigo/requests/dns/create_host.rb @@ -3,7 +3,7 @@ module Fog class Zerigo class Real - require 'fog/dns/parsers/zerigo/create_host' + require 'fog/zerigo/parsers/dns/create_host' # Create a new host in the specified zone # diff --git a/lib/fog/dns/requests/zerigo/create_zone.rb b/lib/fog/zerigo/requests/dns/create_zone.rb similarity index 98% rename from lib/fog/dns/requests/zerigo/create_zone.rb rename to lib/fog/zerigo/requests/dns/create_zone.rb index a0251182a..aa034cbf3 100644 --- a/lib/fog/dns/requests/zerigo/create_zone.rb +++ b/lib/fog/zerigo/requests/dns/create_zone.rb @@ -3,7 +3,7 @@ module Fog class Zerigo class Real - require 'fog/dns/parsers/zerigo/create_zone' + require 'fog/zerigo/parsers/dns/create_zone' # Create a new zone for Zerigo's DNS servers to serve/host # ==== Parameters diff --git a/lib/fog/dns/requests/zerigo/delete_host.rb b/lib/fog/zerigo/requests/dns/delete_host.rb similarity index 100% rename from lib/fog/dns/requests/zerigo/delete_host.rb rename to lib/fog/zerigo/requests/dns/delete_host.rb diff --git a/lib/fog/dns/requests/zerigo/delete_zone.rb b/lib/fog/zerigo/requests/dns/delete_zone.rb similarity index 100% rename from lib/fog/dns/requests/zerigo/delete_zone.rb rename to lib/fog/zerigo/requests/dns/delete_zone.rb diff --git a/lib/fog/dns/requests/zerigo/find_hosts.rb b/lib/fog/zerigo/requests/dns/find_hosts.rb similarity index 96% rename from lib/fog/dns/requests/zerigo/find_hosts.rb rename to lib/fog/zerigo/requests/dns/find_hosts.rb index 07e4d0f9c..dbe3848d5 100644 --- a/lib/fog/dns/requests/zerigo/find_hosts.rb +++ b/lib/fog/zerigo/requests/dns/find_hosts.rb @@ -3,7 +3,7 @@ module Fog class Zerigo class Real - require 'fog/dns/parsers/zerigo/find_hosts' + require 'fog/zerigo/parsers/dns/find_hosts' # Get list of all the host records that match the FQDN. If desired, can limit # search to a specific zone diff --git a/lib/fog/dns/requests/zerigo/get_host.rb b/lib/fog/zerigo/requests/dns/get_host.rb similarity index 95% rename from lib/fog/dns/requests/zerigo/get_host.rb rename to lib/fog/zerigo/requests/dns/get_host.rb index e9362fcbc..e2410c28e 100644 --- a/lib/fog/dns/requests/zerigo/get_host.rb +++ b/lib/fog/zerigo/requests/dns/get_host.rb @@ -3,7 +3,7 @@ module Fog class Zerigo class Real - require 'fog/dns/parsers/zerigo/get_host' + require 'fog/zerigo/parsers/dns/get_host' # get details about a given host record # diff --git a/lib/fog/dns/requests/zerigo/get_zone.rb b/lib/fog/zerigo/requests/dns/get_zone.rb similarity index 96% rename from lib/fog/dns/requests/zerigo/get_zone.rb rename to lib/fog/zerigo/requests/dns/get_zone.rb index 951c440e0..c335ca0c2 100644 --- a/lib/fog/dns/requests/zerigo/get_zone.rb +++ b/lib/fog/zerigo/requests/dns/get_zone.rb @@ -3,7 +3,7 @@ module Fog class Zerigo class Real - require 'fog/dns/parsers/zerigo/get_zone' + require 'fog/zerigo/parsers/dns/get_zone' # Get details of a DNS zone. The response is similar to list_zones, with the # addition of hosts-count and possibly hosts. diff --git a/lib/fog/dns/requests/zerigo/get_zone_stats.rb b/lib/fog/zerigo/requests/dns/get_zone_stats.rb similarity index 95% rename from lib/fog/dns/requests/zerigo/get_zone_stats.rb rename to lib/fog/zerigo/requests/dns/get_zone_stats.rb index 776fe2651..c7726f10e 100644 --- a/lib/fog/dns/requests/zerigo/get_zone_stats.rb +++ b/lib/fog/zerigo/requests/dns/get_zone_stats.rb @@ -3,7 +3,7 @@ module Fog class Zerigo class Real - require 'fog/dns/parsers/zerigo/get_zone_stats' + require 'fog/zerigo/parsers/dns/get_zone_stats' # returns current traffic statistics about this zone. Queries is measured from the # beginning of the current period through the time of the API call. diff --git a/lib/fog/dns/requests/zerigo/list_hosts.rb b/lib/fog/zerigo/requests/dns/list_hosts.rb similarity index 95% rename from lib/fog/dns/requests/zerigo/list_hosts.rb rename to lib/fog/zerigo/requests/dns/list_hosts.rb index a7c7fdd1f..3a980bac3 100644 --- a/lib/fog/dns/requests/zerigo/list_hosts.rb +++ b/lib/fog/zerigo/requests/dns/list_hosts.rb @@ -3,7 +3,7 @@ module Fog class Zerigo class Real - require 'fog/dns/parsers/zerigo/list_hosts' + require 'fog/zerigo/parsers/dns/list_hosts' # Get list of all DNS zones hosted on Slicehost (for this account) # diff --git a/lib/fog/dns/requests/zerigo/list_zones.rb b/lib/fog/zerigo/requests/dns/list_zones.rb similarity index 96% rename from lib/fog/dns/requests/zerigo/list_zones.rb rename to lib/fog/zerigo/requests/dns/list_zones.rb index 47988a382..b7f541bf0 100644 --- a/lib/fog/dns/requests/zerigo/list_zones.rb +++ b/lib/fog/zerigo/requests/dns/list_zones.rb @@ -3,7 +3,7 @@ module Fog class Zerigo class Real - require 'fog/dns/parsers/zerigo/list_zones' + require 'fog/zerigo/parsers/dns/list_zones' # Get list of all DNS zones hosted on Slicehost (for this account) # diff --git a/lib/fog/dns/requests/zerigo/update_host.rb b/lib/fog/zerigo/requests/dns/update_host.rb similarity index 100% rename from lib/fog/dns/requests/zerigo/update_host.rb rename to lib/fog/zerigo/requests/dns/update_host.rb diff --git a/lib/fog/dns/requests/zerigo/update_zone.rb b/lib/fog/zerigo/requests/dns/update_zone.rb similarity index 100% rename from lib/fog/dns/requests/zerigo/update_zone.rb rename to lib/fog/zerigo/requests/dns/update_zone.rb