2010-12-11 20:01:33 -05:00
|
|
|
class Zerigo < Fog::Bin
|
|
|
|
class << self
|
|
|
|
|
|
|
|
def class_for(key)
|
|
|
|
case key
|
2010-12-21 16:45:53 -05:00
|
|
|
when :dns
|
2011-06-15 20:25:01 -04:00
|
|
|
Fog::DNS::Zerigo
|
2014-02-19 07:30:59 -05:00
|
|
|
else
|
2010-12-11 20:01:33 -05:00
|
|
|
raise ArgumentError, "Unrecognized service: #{key}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def [](service)
|
|
|
|
@@connections ||= Hash.new do |hash, key|
|
2011-01-14 13:41:12 -05:00
|
|
|
hash[key] = case key
|
2011-01-12 20:55:24 -05:00
|
|
|
when :dns
|
2011-10-19 15:49:34 -04:00
|
|
|
Fog::Logger.warning("Zerigo[:dns] is not recommended, use DNS[:zerigo] for portability")
|
2011-01-12 20:55:24 -05:00
|
|
|
Fog::DNS.new(:provider => 'Zerigo')
|
|
|
|
else
|
2011-02-04 11:17:30 -05:00
|
|
|
raise ArgumentError, "Unrecognized service: #{key.inspect}"
|
2011-01-12 20:55:24 -05:00
|
|
|
end
|
2010-12-11 20:01:33 -05:00
|
|
|
end
|
|
|
|
@@connections[service]
|
|
|
|
end
|
|
|
|
|
|
|
|
def services
|
2011-02-04 11:17:30 -05:00
|
|
|
Fog::Zerigo.services
|
2010-12-11 20:01:33 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|