From ac3670eaf856120be7eb9993b1603125abe633ae Mon Sep 17 00:00:00 2001 From: rabi Date: Tue, 30 Jan 2018 10:00:34 +0530 Subject: [PATCH] Fix senlinclient plugin New senlinclient release have broken the plugin. Depends-On: Idf9ada2da132092c579f2aa432b5d128531b2737 Change-Id: I7eb100b0eab75f239c75f1bd015536b24b50ca44 Closes-Bug: #1746156 --- heat/engine/clients/os/senlin.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/heat/engine/clients/os/senlin.py b/heat/engine/clients/os/senlin.py index e77eab1b29..bfad6b39f9 100644 --- a/heat/engine/clients/os/senlin.py +++ b/heat/engine/clients/os/senlin.py @@ -17,9 +17,8 @@ from heat.engine.clients import client_plugin from heat.engine import constraints from openstack import profile -from openstack import session -from senlinclient import client from senlinclient.common import exc +from senlinclient.v1 import client CLIENT_NAME = 'senlin' @@ -27,18 +26,15 @@ CLIENT_NAME = 'senlin' class SenlinClientPlugin(client_plugin.ClientPlugin): service_types = [CLUSTERING] = ['clustering'] - VERSION = '1' def _create(self): interface = self._get_client_option(CLIENT_NAME, 'endpoint_type') prof = profile.Profile() prof.set_interface(self.CLUSTERING, interface) prof.set_region(self.CLUSTERING, self._get_region_name()) - keystone_session = self.context.keystone_session - s = session.Session(session=keystone_session, - auth=keystone_session.auth, - profile=prof) - return client.Client(self.VERSION, session=s) + key_session = self.context.keystone_session + return client.Client(prof=prof, + authenticator=key_session.auth) def generate_spec(self, spec_type, spec_props): spec = {'properties': spec_props}