201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
|
# File 'lib/deltacloud/drivers/eucalyptus/eucalyptus_driver.rb', line 201
def endpoint_for_service(service)
service = service.to_s
endpoint = api_provider
if endpoint && endpoint.include?(service)
addr = Hash[endpoint.split(";").map { |svc| svc.strip.split("=") }][service]
host = addr.split(':')[0]
port = addr.split(':')[1] || DEFAULT_PORT
stub = SERVICE_STUBS[service]
{ :endpoint_url => "http://#{host}:#{port}#{stub}",
:connection_mode => :per_thread }
else
{ :connection_mode => :per_thread }
end
end
|