2011-01-08 00:12:04 +00:00
|
|
|
require 'fog/aws'
|
|
|
|
require 'fog/linode'
|
|
|
|
require 'fog/slicehost'
|
|
|
|
require 'fog/zerigo'
|
|
|
|
|
2011-01-05 00:49:35 +00:00
|
|
|
module Fog
|
|
|
|
class DNS
|
|
|
|
|
|
|
|
def self.new(attributes)
|
|
|
|
attributes = attributes.dup # prevent delete from having side effects
|
|
|
|
case provider = attributes.delete(:provider)
|
|
|
|
when 'AWS'
|
|
|
|
require 'fog/aws'
|
|
|
|
Fog::AWS::DNS.new(attributes)
|
|
|
|
when 'Linode'
|
|
|
|
require 'fog/linode'
|
|
|
|
Fog::Linode::DNS.new(attributes)
|
|
|
|
when 'Slicehost'
|
|
|
|
require 'fog/slicehost'
|
|
|
|
Fog::Slicehost::DNS.new(attributes)
|
|
|
|
when 'Zerigo'
|
|
|
|
require 'fog/zerigo'
|
|
|
|
Fog::Zerigo::DNS.new(attributes)
|
|
|
|
else
|
|
|
|
raise ArgumentError.new("#{provider} is not a recognized storage provider")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|