diff options
| author | Jenkins <jenkins@review.openstack.org> | 2015-07-20 16:53:31 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2015-07-20 16:53:31 +0000 |
| commit | 07248b3642926b0329fd0c060822f3c6e3ced62a (patch) | |
| tree | 122cbc133abc91435f319e6e2659898a3f0b2c9f /openstackclient/shell.py | |
| parent | 457ea944786986705ddf137feb05cbd1440063f3 (diff) | |
| parent | c5b43831606e0fd813e1f06b40950f8c85555953 (diff) | |
| download | python-openstackclient-07248b3642926b0329fd0c060822f3c6e3ced62a.tar.gz | |
Merge "Fix the way auth_type default value is overriden"
Diffstat (limited to 'openstackclient/shell.py')
| -rw-r--r-- | openstackclient/shell.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/openstackclient/shell.py b/openstackclient/shell.py index edeffdfb..319f10de 100644 --- a/openstackclient/shell.py +++ b/openstackclient/shell.py @@ -240,9 +240,9 @@ class OpenStackShell(app.App): # Set the default plugin to token_endpoint if url and token are given if (self.options.url and self.options.token): # Use service token authentication - cloud_config.set_default('auth_type', 'token_endpoint') + auth_type = 'token_endpoint' else: - cloud_config.set_default('auth_type', 'osc_password') + auth_type = 'osc_password' self.log.debug("options: %s", self.options) project_id = getattr(self.options, 'project_id', None) @@ -266,7 +266,8 @@ class OpenStackShell(app.App): # Ignore the default value of interface. Only if it is set later # will it be used. cc = cloud_config.OpenStackConfig( - override_defaults={'interface': None, }) + override_defaults={'interface': None, + 'auth_type': auth_type, }) self.log.debug("defaults: %s", cc.defaults) self.cloud = cc.get_one_cloud( |
