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