2010-09-21 14:11:15 -04:00
|
|
|
class Bluebox < Fog::Bin
|
2010-05-24 13:29:01 -04:00
|
|
|
class << self
|
2010-05-24 14:03:52 -04:00
|
|
|
|
2010-05-24 13:29:01 -04:00
|
|
|
def [](service)
|
|
|
|
@@connections ||= Hash.new do |hash, key|
|
|
|
|
hash[key] = case key
|
2010-09-08 17:00:43 -04:00
|
|
|
when :blocks
|
|
|
|
location = caller.first
|
|
|
|
warning = "[yellow][WARN] Bluebox[:blocks] is deprecated, use Bluebox[:compute] instead[/]"
|
|
|
|
warning << " [light_black](" << location << ")[/] "
|
|
|
|
Formatador.display_line(warning)
|
|
|
|
Fog::Bluebox::Compute.new
|
2010-09-08 15:07:45 -04:00
|
|
|
when :compute
|
|
|
|
Fog::Bluebox::Compute.new
|
2010-05-24 13:29:01 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
@@connections[service]
|
|
|
|
end
|
|
|
|
|
2010-09-03 18:32:30 -04:00
|
|
|
def services
|
2010-09-08 15:07:45 -04:00
|
|
|
[:compute]
|
2010-09-03 18:32:30 -04:00
|
|
|
end
|
|
|
|
|
2010-05-24 13:29:01 -04:00
|
|
|
end
|
|
|
|
end
|