diff options
| author | Jenkins <jenkins@review.openstack.org> | 2014-10-17 23:27:28 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2014-10-17 23:27:28 +0000 |
| commit | 68130fa92182760882def8d3a3a97fcde5d355a1 (patch) | |
| tree | e46a739aaa934883b9c749fc7e40fdfa22b163c7 /openstackclient/compute | |
| parent | efc572efc1ac4ad4c595c772bf7daa1cd94e25eb (diff) | |
| parent | c3c6edbe8a083aef0fb6aea3cb461ff8e715fc59 (diff) | |
| download | python-openstackclient-68130fa92182760882def8d3a3a97fcde5d355a1.tar.gz | |
Merge "Add plugin to support token-endpoint auth"
Diffstat (limited to 'openstackclient/compute')
| -rw-r--r-- | openstackclient/compute/client.py | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/openstackclient/compute/client.py b/openstackclient/compute/client.py index d473295b..ff9ed88a 100644 --- a/openstackclient/compute/client.py +++ b/openstackclient/compute/client.py @@ -44,33 +44,20 @@ def make_client(instance): extensions = [extension.Extension('list_extensions', list_extensions)] client = compute_client( - username=instance._username, - api_key=instance._password, - project_id=instance._project_name, - auth_url=instance._auth_url, - cacert=instance._cacert, - insecure=instance._insecure, - region_name=instance._region_name, - # FIXME(dhellmann): get endpoint_type from option? - endpoint_type='publicURL', + session=instance.session, extensions=extensions, - service_type=API_NAME, - # FIXME(dhellmann): what is service_name? - service_name='', http_log_debug=http_log_debug, timings=instance.timing, ) # Populate the Nova client to skip another auth query to Identity - if instance._url: - # token flow - client.client.management_url = instance._url - else: + if 'token' not in instance._auth_params: # password flow client.client.management_url = instance.get_endpoint_for_service_type( API_NAME, region_name=instance._region_name) client.client.service_catalog = instance._service_catalog - client.client.auth_token = instance._token + client.client.auth_token = instance.auth.get_token(instance.session) + return client |
