From fff4a1cd23057160af13f157a6fde2c172fae7a9 Mon Sep 17 00:00:00 2001 From: Steve Martinelli Date: Fri, 16 Jan 2015 02:20:52 -0500 Subject: Add helpful messages when authN'ing with password Setting up auth options can be complicated, and we currently don't do any checking before we build all our auth parameters to send off to keystoneclient. We should do some basic checking to guide new users. Change-Id: I9c88f1c9637b3870c151952ecc797aaf65be271a Closes-Bug: #1400531 --- openstackclient/common/clientmanager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'openstackclient/common') diff --git a/openstackclient/common/clientmanager.py b/openstackclient/common/clientmanager.py index 0396e83d..cc75c68d 100644 --- a/openstackclient/common/clientmanager.py +++ b/openstackclient/common/clientmanager.py @@ -74,13 +74,16 @@ class ClientManager(object): :param pw_func: Callback function for asking the user for a password. The function takes an optional string for the prompt ('Password: ' on None) and - returns a string containig the password + returns a string containing the password """ # If no auth type is named by the user, select one based on # the supplied options self.auth_plugin_name = auth.select_auth_plugin(auth_options) + # Basic option checking to avoid unhelpful error messages + auth.check_valid_auth_options(auth_options, self.auth_plugin_name) + # Horrible hack alert...must handle prompt for null password if # password auth is requested. if (self.auth_plugin_name.endswith('password') and -- cgit v1.2.1