mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
24 lines
559 B
Ruby
24 lines
559 B
Ruby
module Terremark
|
|
class << self
|
|
if Fog.credentials[:terremark_password] && Fog.credentials[:terremark_username]
|
|
|
|
def initialized?
|
|
true
|
|
end
|
|
|
|
def [](service)
|
|
@@connections ||= Hash.new do |hash, key|
|
|
credentials = Fog.credentials.reject do |k,v|
|
|
![:terremark_username, :terremark_password].include?(k)
|
|
end
|
|
hash[key] = case key
|
|
when :vcloud
|
|
Fog::Terremark.new(credentials)
|
|
end
|
|
end
|
|
@@connections[service]
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|