2010-09-21 14:11:15 -04:00
|
|
|
class Slicehost < Fog::Bin
|
2010-02-12 00:41:37 -05:00
|
|
|
class << self
|
|
|
|
|
2010-09-21 14:11:15 -04:00
|
|
|
def [](service)
|
|
|
|
@@connections ||= Hash.new do |hash, key|
|
|
|
|
hash[key] = case key
|
|
|
|
when :compute
|
|
|
|
Fog::Slicehost::Compute.new
|
|
|
|
when :slices
|
|
|
|
location = caller.first
|
|
|
|
warning = "[yellow][WARN] Slicehost[:blocks] is deprecated, use Bluebox[:compute] instead[/]"
|
|
|
|
warning << " [light_black](" << location << ")[/] "
|
|
|
|
Formatador.display_line(warning)
|
|
|
|
Fog::Slicehost::Compute.new
|
2010-02-12 00:41:37 -05:00
|
|
|
end
|
|
|
|
end
|
2010-09-21 14:11:15 -04:00
|
|
|
@@connections[service]
|
|
|
|
end
|
2010-02-12 00:41:37 -05:00
|
|
|
|
2010-09-21 14:11:15 -04:00
|
|
|
def services
|
|
|
|
[:compute]
|
2010-02-12 00:41:37 -05:00
|
|
|
end
|
2010-09-21 14:11:15 -04:00
|
|
|
|
2010-02-12 00:41:37 -05:00
|
|
|
end
|
|
|
|
end
|