add overide for fog openstack v3
This commit is contained in:
parent
946c564f59
commit
868decd06e
1 changed files with 23 additions and 0 deletions
|
@ -40,3 +40,26 @@ module Fog::OpenStack::Auth::Catalog
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
require 'fog/openstack/auth/catalog/v3'
|
||||||
|
module Fog::OpenStack::Auth::Catalog
|
||||||
|
class V3
|
||||||
|
def endpoint_url(endpoint, interface)
|
||||||
|
url = endpoint["#{interface}URL"]
|
||||||
|
|
||||||
|
if interface == 'public'
|
||||||
|
publicize(url)
|
||||||
|
else
|
||||||
|
url
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def publicize(url)
|
||||||
|
search = %r{^https://[^/]+/}
|
||||||
|
replace = "#{ENV['DS_PROXY_URL']}/"
|
||||||
|
url.gsub(search, replace)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in a new issue