From 4671d657708f94b1be32655e6d0e69189dad435e Mon Sep 17 00:00:00 2001 From: Kyle Rames Date: Fri, 25 Oct 2013 12:04:18 -0500 Subject: [PATCH] [rackspace] updating compute and storage to pull service net urls from service catalog --- lib/fog/rackspace/compute.rb | 5 +---- lib/fog/rackspace/service.rb | 6 +++++- lib/fog/rackspace/storage.rb | 5 +---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/lib/fog/rackspace/compute.rb b/lib/fog/rackspace/compute.rb index a79922e2b..6e2375cea 100644 --- a/lib/fog/rackspace/compute.rb +++ b/lib/fog/rackspace/compute.rb @@ -240,10 +240,7 @@ module Fog def endpoint_uri(service_endpoint_url=nil) return @uri if @uri - - @uri = super(@rackspace_endpoint || service_endpoint_url, :rackspace_compute_v1_url) - @uri.host = "snet-#{@uri.host}" if service_net? - @uri + super(@rackspace_endpoint || service_endpoint_url, :rackspace_compute_v1_url) end private diff --git a/lib/fog/rackspace/service.rb b/lib/fog/rackspace/service.rb index b2d3fbcd9..1e6b51cdc 100644 --- a/lib/fog/rackspace/service.rb +++ b/lib/fog/rackspace/service.rb @@ -52,6 +52,10 @@ module Fog response end + def service_net? + false + end + private def process_response(response) @@ -118,7 +122,7 @@ module Fog end def endpoint_uri_v2 - @uri = @identity_service.service_catalog.get_endpoint(service_name, region) + @uri = @identity_service.service_catalog.get_endpoint(service_name, region, service_net?) end def auth_token diff --git a/lib/fog/rackspace/storage.rb b/lib/fog/rackspace/storage.rb index 273fd3097..1fc2d450e 100644 --- a/lib/fog/rackspace/storage.rb +++ b/lib/fog/rackspace/storage.rb @@ -190,10 +190,7 @@ module Fog def endpoint_uri(service_endpoint_url=nil) return @uri if @uri - - @uri = super(@rackspace_storage_url || service_endpoint_url, :rackspace_storage_url) - @uri.host = "snet-#{@uri.host}" if service_net? - @uri + super(@rackspace_storage_url || service_endpoint_url, :rackspace_storage_url) end private