diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-10-17 20:59:08 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-10-17 20:59:08 +0000 |
commit | c14e1827f67df9293a63fbe26f336c83f0593514 (patch) | |
tree | 4d99581091a7cd7ad19563c3bbb313adbc1305c1 /heatclient/osc | |
parent | a57ea561598b7d8842bb0cf170f142a4c4430315 (diff) | |
parent | 6288620093df182fe2d12585ae343f76f13c8706 (diff) | |
download | python-heatclient-c14e1827f67df9293a63fbe26f336c83f0593514.tar.gz |
Merge "Use region_name and interface with session"
Diffstat (limited to 'heatclient/osc')
-rw-r--r-- | heatclient/osc/plugin.py | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/heatclient/osc/plugin.py b/heatclient/osc/plugin.py index b57d2de..ea1b69e 100644 --- a/heatclient/osc/plugin.py +++ b/heatclient/osc/plugin.py @@ -33,24 +33,23 @@ def make_client(instance): API_VERSIONS) LOG.debug('Instantiating orchestration client: %s', heat_client) + kwargs = {'region_name': instance.region_name, + 'interface': instance.interface} + if instance.session: - kwargs = {'session': instance.session, - 'service_type': API_NAME} + kwargs.update({'session': instance.session, + 'service_type': API_NAME}) else: - # Note: We can change '_interface' and '_region_name' once - # the requirements change to python-openstackclient-2.6.1 endpoint = instance.get_endpoint_for_service_type( API_NAME, - region_name=instance._region_name, - interface=instance._interface, + region_name=instance.region_name, + interface=instance.interface, ) - kwargs = {'endpoint': endpoint, - 'auth_url': instance.auth.auth_url, - 'region_name': instance._region_name, - 'username': instance.auth_ref.username} - - kwargs.update(token=instance.auth_ref.auth_token) + kwargs.update({'endpoint': endpoint, + 'auth_url': instance.auth.auth_url, + 'username': instance.auth_ref.username, + 'token': instance.auth_ref.auth_token}) client = heat_client(**kwargs) |