Skip to content

Commit 21bd461

Browse files
author
Dean Troyer
committed
Clean up make_client() logging
Change-Id: I0b6760a6401b50e3dfb891af75424ae89df42ebc
1 parent ea938e8 commit 21bd461

6 files changed

Lines changed: 11 additions & 6 deletions

File tree

‎openstackclient/compute/client.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def make_client(instance):
3434
API_NAME,
3535
instance._api_version[API_NAME],
3636
API_VERSIONS)
37-
LOG.debug('instantiating compute client: %s', compute_client)
37+
LOG.debug('Instantiating compute client: %s', compute_client)
3838

3939
# Set client http_log_debug to True if verbosity level is high enough
4040
http_log_debug = utils.get_effective_log_level() <= logging.DEBUG

‎openstackclient/identity/client.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ def make_client(instance):
3636
API_NAME,
3737
instance._api_version[API_NAME],
3838
API_VERSIONS)
39+
LOG.debug('Instantiating identity client: %s' % identity_client)
40+
3941
if instance._url:
40-
LOG.debug('instantiating identity client: token flow')
42+
LOG.debug('Using token auth')
4143
client = identity_client(
4244
endpoint=instance._url,
4345
token=instance._token,
@@ -46,7 +48,7 @@ def make_client(instance):
4648
trust_id=instance._trust_id,
4749
)
4850
else:
49-
LOG.debug('instantiating identity client: password flow')
51+
LOG.debug('Using password auth')
5052
client = identity_client(
5153
username=instance._username,
5254
password=instance._password,

‎openstackclient/image/client.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def make_client(instance):
3838
API_NAME,
3939
instance._api_version[API_NAME],
4040
API_VERSIONS)
41+
LOG.debug('Instantiating image client: %s', image_client)
4142

4243
if not instance._url:
4344
instance._url = instance.get_endpoint_for_service_type(API_NAME)

‎openstackclient/network/client.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ def make_client(instance):
3232
API_NAME,
3333
instance._api_version[API_NAME],
3434
API_VERSIONS)
35+
LOG.debug('Instantiating network client: %s', network_client)
36+
3537
if not instance._url:
3638
instance._url = instance.get_endpoint_for_service_type("network")
3739
return network_client(

‎openstackclient/object/client.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ def make_client(instance):
3535
API_NAME,
3636
instance._api_version[API_NAME],
3737
API_VERSIONS)
38+
LOG.debug('Instantiating object client: %s' % object_client)
39+
3840
if instance._url:
3941
endpoint = instance._url
4042
else:
4143
endpoint = instance.get_endpoint_for_service_type(API_NAME)
42-
LOG.debug('instantiating object client')
4344
client = object_client(
4445
endpoint=endpoint,
4546
token=instance._token,

‎openstackclient/volume/client.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ def make_client(instance):
4040
instance._api_version[API_NAME],
4141
API_VERSIONS
4242
)
43-
44-
LOG.debug('instantiating volume client')
43+
LOG.debug('Instantiating volume client: %s', volume_client)
4544

4645
# Set client http_log_debug to True if verbosity level is high enough
4746
http_log_debug = utils.get_effective_log_level() <= logging.DEBUG

0 commit comments

Comments
 (0)