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