Merge "Fix senlinclient plugin"
This commit is contained in:
commit
9e4cda46e6
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user