Merge "Support token based auth options for osc"

This commit is contained in:
Jenkins 2016-02-05 00:03:37 +00:00 committed by Gerrit Code Review
commit 92a282cb71
1 changed files with 7 additions and 4 deletions

View File

@ -32,13 +32,16 @@ def make_client(instance):
instance._api_version[API_NAME],
API_VERSIONS)
# Set client http_log_debug to True if verbosity level is high enough
http_log_debug = utils.get_effective_log_level() <= logging.DEBUG
# Remember interface only if it is set
kwargs = utils.build_kwargs_dict('endpoint_type', instance._interface)
client = search_client(
endpoint=instance.get_endpoint_for_service_type('search'),
session=instance.session,
auth_url=instance._auth_url,
username=instance._username,
password=instance._password,
http_log_debug=http_log_debug,
region_name=instance._region_name,
**kwargs
)
return client