2011-09-30 17:45:09 -04:00
|
|
|
class Clodo < Fog::Bin
|
|
|
|
class << self
|
|
|
|
|
|
|
|
def class_for(key)
|
|
|
|
case key
|
|
|
|
when :compute
|
|
|
|
Fog::Compute::Clodo
|
2014-02-19 07:30:59 -05:00
|
|
|
else
|
2011-09-30 17:45:09 -04:00
|
|
|
raise ArgumentError, "Unrecognized service: #{key}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def [](service)
|
|
|
|
@@connections ||= Hash.new do |hash, key|
|
|
|
|
hash[key] = case key
|
|
|
|
when :compute
|
|
|
|
Formatador.display_line("[yellow][WARN] Clodo[:compute] is deprecated, use Compute[:clodo] instead[/]")
|
|
|
|
Fog::Compute.new(:provider => 'Clodo')
|
|
|
|
else
|
|
|
|
raise ArgumentError, "Unrecognized service: #{key.inspect}"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
@@connections[service]
|
|
|
|
end
|
|
|
|
|
|
|
|
def services
|
|
|
|
Fog::Clodo.services
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|