2010-09-21 18:11:15 +00:00
|
|
|
class Bluebox < Fog::Bin
|
2010-05-24 17:29:01 +00:00
|
|
|
class << self
|
2010-05-24 18:03:52 +00:00
|
|
|
|
2010-05-24 17:29:01 +00:00
|
|
|
def [](service)
|
|
|
|
@@connections ||= Hash.new do |hash, key|
|
|
|
|
hash[key] = case key
|
2010-09-08 21:00:43 +00: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 19:07:45 +00:00
|
|
|
when :compute
|
|
|
|
Fog::Bluebox::Compute.new
|
2010-05-24 17:29:01 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
@@connections[service]
|
|
|
|
end
|
|
|
|
|
2010-09-03 22:32:30 +00:00
|
|
|
def services
|
2010-09-08 19:07:45 +00:00
|
|
|
[:compute]
|
2010-09-03 22:32:30 +00:00
|
|
|
end
|
|
|
|
|
2010-05-24 17:29:01 +00:00
|
|
|
end
|
|
|
|
end
|