Use internal auth url to communicate with swift
Use internal auth url to communicate with swift and make endpoint type overridable Change-Id: Ie482c006531bc1b31ee9ac380834b88d748b3557 Closes-bug: 1535105
This commit is contained in:
parent
aef8c4206c
commit
ce3eb674a7
@ -28,12 +28,12 @@ SWIFT_URL_SUFFIX_START = '.'
|
||||
SWIFT_URL_SUFFIX = SWIFT_URL_SUFFIX_START + 'sahara'
|
||||
|
||||
|
||||
def retrieve_auth_url():
|
||||
def retrieve_auth_url(endpoint_type="publicURL"):
|
||||
"""This function returns auth url v2.0 api.
|
||||
|
||||
Hadoop Swift library doesn't support keystone v3 api.
|
||||
"""
|
||||
auth_url = clients_base.retrieve_auth_url(endpoint_type="publicURL")
|
||||
auth_url = clients_base.retrieve_auth_url(endpoint_type=endpoint_type)
|
||||
info = urlparse.urlparse(auth_url)
|
||||
|
||||
if CONF.use_domain_for_proxy_users:
|
||||
|
@ -66,7 +66,7 @@ def client(username, password, trust_id=None):
|
||||
auth_version='2.0',
|
||||
cacert=CONF.swift.ca_file,
|
||||
insecure=CONF.swift.api_insecure,
|
||||
authurl=su.retrieve_auth_url(),
|
||||
authurl=su.retrieve_auth_url(CONF.keystone.endpoint_type),
|
||||
user=username,
|
||||
key=password,
|
||||
tenant_name=sh.retrieve_tenant(),
|
||||
|
Loading…
Reference in New Issue
Block a user