1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

minimal support for TMRK eCloud.

Fixed a small issue with ComputeCapacity not working.
This commit is contained in:
Edward Muller 2010-04-16 15:20:02 +08:00 committed by Wesley Beary
parent 05f24e4c8a
commit 58e58cf213
3 changed files with 15 additions and 10 deletions

View file

@ -81,8 +81,16 @@ module Fog
def initialize(options={})
@terremark_password = options[:terremark_password]
@terremark_username = options[:terremark_username]
case options[:terremark_service]
when :ecloud
@host = options[:host] || "services.enterprisecloud.terremark.com"
@path = options[:path] || "/api/v0.8a-ext2.0"
when :vcloud
@host = options[:host] || "services.vcloudexpress.terremark.com"
@path = options[:path] || "/api/v0.8"
else
raise "Unsupported Terremark Service"
end
@port = options[:port] || 443
@scheme = options[:scheme] || 'https'
@cookie = get_organizations.headers['Set-Cookie']

View file

@ -11,10 +11,7 @@ module Terremark
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
hash[key] = Fog::Terremark.new(credentials.merge(:terremark_service => key))
end
@@connections[service]
end