# File lib/deltacloud/drivers/eucalyptus/eucalyptus_driver.rb, line 180 def endpoint_for_service(service) service = service.to_s endpoint = api_provider if endpoint && endpoint.include?(service) # example endpoint: 'ec2=192.168.1.1; s3=192.168.1.2' 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 #EC2_URL/S3_URL env variable will be used by AWS { :connection_mode => :per_thread } end end