From e063246b97a7f31a47aca0a5eb36d571f5df7236 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Mon, 20 Oct 2014 18:53:10 -0500 Subject: 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 --- openstackclient/api/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openstackclient/api/auth.py') 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': -- cgit v1.2.1