Merge "Restore default auth-type for token/endpoint"

This commit is contained in:
Jenkins
2016-08-25 21:07:03 +00:00
committed by Gerrit Code Review

@ -61,8 +61,12 @@ class OpenStackShell(shell.OpenStackShell):
def _final_defaults(self): def _final_defaults(self):
super(OpenStackShell, self)._final_defaults() super(OpenStackShell, self)._final_defaults()
# Set default auth type to password # Set the default plugin to token_endpoint if url and token are given
self._auth_type = 'password' 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): def _load_plugins(self):
"""Load plugins via stevedore """Load plugins via stevedore