mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
58e58cf213
Fixed a small issue with ComputeCapacity not working.
27 lines
592 B
Ruby
27 lines
592 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] = Fog::Terremark.new(credentials.merge(:terremark_service => key))
|
|
end
|
|
@@connections[service]
|
|
end
|
|
|
|
else
|
|
|
|
def initialized?
|
|
false
|
|
end
|
|
|
|
end
|
|
end
|
|
end
|