Clean up make_client() logging
Change-Id: I0b6760a6401b50e3dfb891af75424ae89df42ebc
This commit is contained in:
parent
ea938e8ddf
commit
21bd4619ae
@ -34,7 +34,7 @@ def make_client(instance):
|
||||
API_NAME,
|
||||
instance._api_version[API_NAME],
|
||||
API_VERSIONS)
|
||||
LOG.debug('instantiating compute client: %s', compute_client)
|
||||
LOG.debug('Instantiating compute client: %s', compute_client)
|
||||
|
||||
# Set client http_log_debug to True if verbosity level is high enough
|
||||
http_log_debug = utils.get_effective_log_level() <= logging.DEBUG
|
||||
|
@ -36,8 +36,10 @@ def make_client(instance):
|
||||
API_NAME,
|
||||
instance._api_version[API_NAME],
|
||||
API_VERSIONS)
|
||||
LOG.debug('Instantiating identity client: %s' % identity_client)
|
||||
|
||||
if instance._url:
|
||||
LOG.debug('instantiating identity client: token flow')
|
||||
LOG.debug('Using token auth')
|
||||
client = identity_client(
|
||||
endpoint=instance._url,
|
||||
token=instance._token,
|
||||
@ -46,7 +48,7 @@ def make_client(instance):
|
||||
trust_id=instance._trust_id,
|
||||
)
|
||||
else:
|
||||
LOG.debug('instantiating identity client: password flow')
|
||||
LOG.debug('Using password auth')
|
||||
client = identity_client(
|
||||
username=instance._username,
|
||||
password=instance._password,
|
||||
|
@ -38,6 +38,7 @@ def make_client(instance):
|
||||
API_NAME,
|
||||
instance._api_version[API_NAME],
|
||||
API_VERSIONS)
|
||||
LOG.debug('Instantiating image client: %s', image_client)
|
||||
|
||||
if not instance._url:
|
||||
instance._url = instance.get_endpoint_for_service_type(API_NAME)
|
||||
|
@ -32,6 +32,8 @@ def make_client(instance):
|
||||
API_NAME,
|
||||
instance._api_version[API_NAME],
|
||||
API_VERSIONS)
|
||||
LOG.debug('Instantiating network client: %s', network_client)
|
||||
|
||||
if not instance._url:
|
||||
instance._url = instance.get_endpoint_for_service_type("network")
|
||||
return network_client(
|
||||
|
@ -35,11 +35,12 @@ def make_client(instance):
|
||||
API_NAME,
|
||||
instance._api_version[API_NAME],
|
||||
API_VERSIONS)
|
||||
LOG.debug('Instantiating object client: %s' % object_client)
|
||||
|
||||
if instance._url:
|
||||
endpoint = instance._url
|
||||
else:
|
||||
endpoint = instance.get_endpoint_for_service_type(API_NAME)
|
||||
LOG.debug('instantiating object client')
|
||||
client = object_client(
|
||||
endpoint=endpoint,
|
||||
token=instance._token,
|
||||
|
@ -40,8 +40,7 @@ def make_client(instance):
|
||||
instance._api_version[API_NAME],
|
||||
API_VERSIONS
|
||||
)
|
||||
|
||||
LOG.debug('instantiating volume client')
|
||||
LOG.debug('Instantiating volume client: %s', volume_client)
|
||||
|
||||
# Set client http_log_debug to True if verbosity level is high enough
|
||||
http_log_debug = utils.get_effective_log_level() <= logging.DEBUG
|
||||
|
Loading…
Reference in New Issue
Block a user