summaryrefslogtreecommitdiff
path: root/openstackclient/api
diff options
context:
space:
mode:
authorDean Troyer <dtroyer@gmail.com>2014-10-20 18:53:10 -0500
committerDean Troyer <dtroyer@gmail.com>2014-10-21 23:16:16 -0500
commite063246b97a7f31a47aca0a5eb36d571f5df7236 (patch)
tree1272ad2fe096430e7b4311cddac0242212fad7fe /openstackclient/api
parentf600c0eafbf9aff23b6efa1c7b94797a25873b99 (diff)
downloadpython-openstackclient-e063246b97a7f31a47aca0a5eb36d571f5df7236.tar.gz
Clean up shell authentication
* Remove the auth option checks as the auth plugins will validate their own options * Move the initialization of client_manager to the end of initialize_app() so it is always called. Note that no attempts to actually authenticate occur until the first use of one of the client attributes in client_manager. This leaves initialize_clientmanager() (formerly uathenticate_user()) empty so remove it. * Remove interact() as the client_manager has already been created And there is nothing left. * prepare_to_run_command() is reduced to trigger an authentication attempt for the best_effort auth commands, currently the only one is 'complete'. * Add prompt_for_password() to ask the user to enter a password when necessary. Passed to ClientManager in a new kward pw_func. Bug: 1355838 Change-Id: I9fdec9144c4c84f65aed1cf91ce41fe1895089b2
Diffstat (limited to 'openstackclient/api')
-rw-r--r--openstackclient/api/auth.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/openstackclient/api/auth.py b/openstackclient/api/auth.py
index e33b72d5..f6e99cdc 100644
--- a/openstackclient/api/auth.py
+++ b/openstackclient/api/auth.py
@@ -62,7 +62,7 @@ def select_auth_plugin(options):
if options.os_url and options.os_token:
# service token authentication
auth_plugin = 'token_endpoint'
- elif options.os_password:
+ elif options.os_username:
if options.os_identity_api_version == '3':
auth_plugin = 'v3password'
elif options.os_identity_api_version == '2.0':