Merge "Fixing Senlin incompatibility with openstacksdk 0.11.x"
This commit is contained in:
commit
052ca49c87
|
@ -42,9 +42,13 @@ class OpenStackSDKPlugin(client_plugin.ClientPlugin):
|
|||
config=self._get_service_interfaces(),
|
||||
region_name=self._get_region_name(),
|
||||
app_name='heat',
|
||||
app_version=heat.version.version_info.version_string())
|
||||
app_version=heat.version.version_info.version_string(),
|
||||
**self._get_additional_create_args(version))
|
||||
return connection.Connection(config=config)
|
||||
|
||||
def _get_additional_create_args(self, version):
|
||||
return {}
|
||||
|
||||
def _get_service_interfaces(self):
|
||||
interfaces = {}
|
||||
if not os_service_types:
|
||||
|
|
|
@ -29,6 +29,11 @@ class SenlinClientPlugin(sdk_plugin.OpenStackSDKPlugin):
|
|||
client = super(SenlinClientPlugin, self)._create(version=version)
|
||||
return client.clustering
|
||||
|
||||
def _get_additional_create_args(self, version):
|
||||
return {
|
||||
'clustering_api_version': version or '1'
|
||||
}
|
||||
|
||||
def generate_spec(self, spec_type, spec_props):
|
||||
spec = {'properties': spec_props}
|
||||
spec['type'], spec['version'] = spec_type.split('-')
|
||||
|
|
Loading…
Reference in New Issue