Fix senlinclient plugin

New senlinclient release have broken the plugin.

Depends-On: Idf9ada2da132092c579f2aa432b5d128531b2737
Change-Id: I7eb100b0eab75f239c75f1bd015536b24b50ca44
Closes-Bug: #1746156
This commit is contained in:
rabi 2018-01-30 10:00:34 +05:30
parent 7f400ce64a
commit ac3670eaf8
1 changed files with 4 additions and 8 deletions

View File

@ -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}