2010-09-21 14:11:15 -04:00
|
|
|
class Linode < Fog::Bin
|
2010-07-03 11:48:13 -04: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::Linode::Compute.new
|
|
|
|
when :linode
|
|
|
|
location = caller.first
|
|
|
|
warning = "[yellow][WARN] Linode[:linode] is deprecated, use Linode[:compute] instead[/]"
|
|
|
|
warning << " [light_black](" << location << ")[/] "
|
|
|
|
Formatador.display_line(warning)
|
|
|
|
Fog::Linode::Compute.new
|
2010-07-03 11:48:13 -04:00
|
|
|
end
|
|
|
|
end
|
2010-09-21 14:11:15 -04:00
|
|
|
@@connections[service]
|
|
|
|
end
|
2010-07-03 11:48:13 -04:00
|
|
|
|
2010-09-21 14:11:15 -04:00
|
|
|
def services
|
|
|
|
[:compute]
|
2010-07-03 11:48:13 -04:00
|
|
|
end
|
2010-09-21 14:11:15 -04:00
|
|
|
|
2010-07-03 11:48:13 -04:00
|
|
|
end
|
|
|
|
end
|