summaryrefslogtreecommitdiff
path: root/heatclient/shell.py
diff options
context:
space:
mode:
authortamilhce <tamilhce@gmail.com>2016-09-09 09:25:41 +0530
committerrabi <ramishra@redhat.com>2016-09-09 10:01:39 +0530
commitf2147f79aaa42aedbb8c3413151fade301f468e8 (patch)
tree440bdad104e770a30154e0317211584897b8cd5f /heatclient/shell.py
parentdde6bc4d4fcf0461ca3907ce87693673f9a3325d (diff)
downloadpython-heatclient-f2147f79aaa42aedbb8c3413151fade301f468e8.tar.gz
Don't use endpoint_override with session
We should not use endpoint_override by default and rather use service_type with session. This also refactors some of the associated code. However, if one wants to override the endpoint they can pass endpoint_override to the client constructor along with session. Change-Id: I7c27d8ff827de3b4bb3e70457c0b6a3f47b6d7bb Co-Authored-By: Rabi Mishra <ramishra@redhat.com> Closes-Bug: #1621505
Diffstat (limited to 'heatclient/shell.py')
-rw-r--r--heatclient/shell.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/heatclient/shell.py b/heatclient/shell.py
index b6efada..3b24c5c 100644
--- a/heatclient/shell.py
+++ b/heatclient/shell.py
@@ -495,7 +495,6 @@ class HeatShell(object):
'timeout': args.api_timeout
}
- endpoint = args.heat_url
service_type = args.os_service_type or 'orchestration'
if args.os_no_client_auth:
# Do not use session since no_client_auth means using heat to
@@ -507,7 +506,8 @@ class HeatShell(object):
'token': args.os_auth_token,
'include_pass': args.include_password,
'insecure': args.insecure,
- 'timeout': args.api_timeout
+ 'timeout': args.api_timeout,
+ 'endpoint': args.heat_url
}
else:
keystone_session = self._get_keystone_session(**kwargs)
@@ -534,13 +534,7 @@ class HeatShell(object):
'project_domain_name': args.os_project_domain_name,
}
keystone_auth = generic.Password(**kwargs)
- if not endpoint:
- svc_type = service_type
- region_name = args.os_region_name
- endpoint = keystone_auth.get_endpoint(keystone_session,
- service_type=svc_type,
- interface=endpoint_type,
- region_name=region_name)
+
kwargs = {
'auth_url': args.os_auth_url,
'session': keystone_session,
@@ -553,7 +547,7 @@ class HeatShell(object):
'include_pass': args.include_password
}
- client = heat_client.Client(api_version, endpoint, **kwargs)
+ client = heat_client.Client(api_version, **kwargs)
profile = osprofiler_profiler and options.profile
if profile: