Handle token_endpoint auth type in osc plugin
There can be situations where the auth_type=token_endpoint, we
should use the appropriate attributes from the auth plugin when
creating heatclient.
Closes-Bug:
MODIFY
heatclient/osc/plugin.py
heatclient/osc/plugin.py
@@ -41,13 +41,15 @@ def make_client(instance):
if instance.session:
kwargs.update({'session': instance.session,
'service_type': API_NAME})
+ elif instance.auth_plugin_name == 'token_endpoint':
+ kwargs.update({'endpoint': instance.auth.url,
+ 'token': instance.auth.token})
else:
endpoint = instance.get_endpoint_for_service_type(
API_NAME,
region_name=instance.region_name,
interface=instance.interface,
)
-
kwargs.update({'endpoint': endpoint,
'auth_url': instance.auth.auth_url,
'username': instance.auth_ref.username,

Handle token_endpoint auth type in osc plugin

There can be situations where the auth_type=token_endpoint, we
should use the appropriate attributes from the auth plugin when
creating heatclient.

Change-Id: Ic929f6ceaa92002eb2b3443934d1f541758e4dda
Closes-Bug: #1632341