Cleanup the orchestration client init and attr

Clients.py inits the orchestration client and defines and attribute
in the client manager for it. The only known consumers of attribute
are Tempest itself in the cleanup service and Murano.

I proposed a patch to Murano: Ic6fef4b4f260d13efd7b035bc012369f0da55602

The aim is to make clients stable for plugins, and I don't want the
Heat client to be in the stable interface since it's not something
that we will be supporting on Tempest side: all the Heat config
values are deprecated and will be removed during Queens.

Depends-on: Ic6fef4b4f260d13efd7b035bc012369f0da55602
Change-Id: I9f4703296a44e741cab8db6b52ba410b7dd3bed6
This commit is contained in:
Andrea Frittoli 2017-07-17 13:34:17 +01:00
parent 324dbd2673
commit f3e247d25c
2 changed files with 3 additions and 11 deletions

View File

@ -18,7 +18,6 @@ from tempest.lib import auth
from tempest.lib import exceptions as lib_exc
from tempest.lib.services import clients
from tempest.services import object_storage
from tempest.services import orchestration
CONF = config.CONF
@ -49,15 +48,6 @@ class Manager(clients.ServiceClients):
self._set_image_clients()
self._set_network_clients()
self.orchestration_client = orchestration.OrchestrationClient(
self.auth_provider,
CONF.orchestration.catalog_type,
CONF.orchestration.region or CONF.identity.region,
endpoint_type=CONF.orchestration.endpoint_type,
build_interval=CONF.orchestration.build_interval,
build_timeout=CONF.orchestration.build_timeout,
**self.default_params)
def _set_network_clients(self):
self.network_agents_client = self.network.AgentsClient()
self.network_extensions_client = self.network.ExtensionsClient()

View File

@ -213,7 +213,9 @@ class ServerGroupService(ServerService):
class StackService(BaseService):
def __init__(self, manager, **kwargs):
super(StackService, self).__init__(kwargs)
self.client = manager.orchestration_client
params = config.service_client_config('orchestration')
self.client = manager.orchestration.OrchestrationClient(
manager.auth_provider, **params)
def list(self):
client = self.client