Don't read config in Manager class definition
tempest.clients.Manager loads config in the class definition which triggers reading the config file during test discovery. Config is loaded via the service_client_config helper, but that's not needed anymore since service clients get their configuration via the registry (or via a call to service_client_config at __init__ time in case of the swift service client). Change-Id: Iddcfc7227f8ff1b574729a2eb8ebb63e23f09ea5
This commit is contained in:
parent
e56964dfbe
commit
f082079797
|
@ -25,8 +25,6 @@ CONF = config.CONF
|
||||||
class Manager(clients.ServiceClients):
|
class Manager(clients.ServiceClients):
|
||||||
"""Top level manager for OpenStack tempest clients"""
|
"""Top level manager for OpenStack tempest clients"""
|
||||||
|
|
||||||
default_params = config.service_client_config()
|
|
||||||
|
|
||||||
def __init__(self, credentials, scope='project'):
|
def __init__(self, credentials, scope='project'):
|
||||||
"""Initialization of Manager class.
|
"""Initialization of Manager class.
|
||||||
|
|
||||||
|
@ -47,6 +45,10 @@ class Manager(clients.ServiceClients):
|
||||||
self._set_object_storage_clients()
|
self._set_object_storage_clients()
|
||||||
self._set_image_clients()
|
self._set_image_clients()
|
||||||
self._set_network_clients()
|
self._set_network_clients()
|
||||||
|
# TODO(andreaf) This is maintained for backward compatibility
|
||||||
|
# with plugins, but it should removed eventually, since it was
|
||||||
|
# never a stable interface and it's not useful anyways
|
||||||
|
self.default_params = config.service_client_config()
|
||||||
|
|
||||||
def _set_network_clients(self):
|
def _set_network_clients(self):
|
||||||
self.network_agents_client = self.network.AgentsClient()
|
self.network_agents_client = self.network.AgentsClient()
|
||||||
|
|
Loading…
Reference in New Issue