Do not load credentials on import in tempest plugin clients.py
Set the ADMIN_CREDS global variable inside the Manager class constructor instead of doing it on module import. Change-Id: I8c82fa077f316c747a37e31980f7c2d74986bad2 Closes-Bug: 1671813
This commit is contained in:
parent
748e93009a
commit
94c5230413
@ -22,17 +22,22 @@ from ironic_tempest_plugin.services.baremetal.v1.json.baremetal_client import \
|
|||||||
|
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
|
||||||
ADMIN_CREDS = common_creds.get_configured_admin_credentials()
|
ADMIN_CREDS = None
|
||||||
|
|
||||||
|
|
||||||
class Manager(clients.Manager):
|
class Manager(clients.Manager):
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
credentials=ADMIN_CREDS):
|
credentials=None):
|
||||||
"""Initialization of Manager class.
|
"""Initialization of Manager class.
|
||||||
|
|
||||||
Setup service client and make it available for test cases.
|
Setup service client and make it available for test cases.
|
||||||
:param credentials: type Credentials or TestResources
|
:param credentials: type Credentials or TestResources
|
||||||
"""
|
"""
|
||||||
|
if credentials is None:
|
||||||
|
global ADMIN_CREDS
|
||||||
|
if ADMIN_CREDS is None:
|
||||||
|
ADMIN_CREDS = common_creds.get_configured_admin_credentials()
|
||||||
|
credentials = ADMIN_CREDS
|
||||||
super(Manager, self).__init__(credentials)
|
super(Manager, self).__init__(credentials)
|
||||||
default_params_with_timeout_values = {
|
default_params_with_timeout_values = {
|
||||||
'build_interval': CONF.compute.build_interval,
|
'build_interval': CONF.compute.build_interval,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user