From f3e247d25c44e7eb67dc4e760549f63218660da6 Mon Sep 17 00:00:00 2001 From: Andrea Frittoli Date: Mon, 17 Jul 2017 13:34:17 +0100 Subject: [PATCH] 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 --- tempest/clients.py | 10 ---------- tempest/cmd/cleanup_service.py | 4 +++- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/tempest/clients.py b/tempest/clients.py index 6bbc65c9d0..b278e3cd04 100644 --- a/tempest/clients.py +++ b/tempest/clients.py @@ -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() diff --git a/tempest/cmd/cleanup_service.py b/tempest/cmd/cleanup_service.py index f1c0a3ebad..11cd4bb6b3 100644 --- a/tempest/cmd/cleanup_service.py +++ b/tempest/cmd/cleanup_service.py @@ -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