Merge pull request #5210 from betagouv/5207-add-keystone-v3

#5207 - Add overide for fog openstack v3
This commit is contained in:
Keirua 2020-06-02 15:17:24 +02:00 committed by GitHub
commit 95f925f5f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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