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
|
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 13:41:12 -05:00
|
|
|
hash[key] = case key
|
2011-01-12 20:55:24 -05:00
|
|
|
when :dns
|
2011-06-15 20:25:01 -04:00
|
|
|
Formatador.display_line("[yellow][WARN] Zerigo[:dns] is deprecated, use Storage[:zerigo] instead[/]")
|
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
|