diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-08-25 21:07:03 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-08-25 21:07:03 +0000 |
commit | a08b62523fa634d5a61d85d1e9f3b89ab2d4a14e (patch) | |
tree | 8422ca6be56fdc41b294ab496012b4e71c6308af | |
parent | 2774145e441757931a2ece90b308fb8cf7101c61 (diff) | |
parent | 188709c6688b6baa0b9e3c09f4dda745ab1e700e (diff) | |
download | python-openstackclient-a08b62523fa634d5a61d85d1e9f3b89ab2d4a14e.tar.gz |
Merge "Restore default auth-type for token/endpoint"3.1.0
-rw-r--r-- | openstackclient/shell.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/openstackclient/shell.py b/openstackclient/shell.py index 67c51998..da58b63b 100644 --- a/openstackclient/shell.py +++ b/openstackclient/shell.py @@ -61,8 +61,12 @@ class OpenStackShell(shell.OpenStackShell): def _final_defaults(self): super(OpenStackShell, self)._final_defaults() - # Set default auth type to password - self._auth_type = 'password' + # 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 + self._auth_type = 'token_endpoint' + else: + self._auth_type = 'password' def _load_plugins(self): """Load plugins via stevedore |