summaryrefslogtreecommitdiff
path: root/openstackclient/common/clientmanager.py
diff options
context:
space:
mode:
authorSteve Martinelli <stevemar@ca.ibm.com>2015-01-16 02:20:52 -0500
committerSteve Martinelli <stevemar@ca.ibm.com>2015-01-16 02:41:24 -0500
commitfff4a1cd23057160af13f157a6fde2c172fae7a9 (patch)
tree451c53610a9fef84e92fb723907f4d16a064ef75 /openstackclient/common/clientmanager.py
parent77097c6cd48142e94853aa568692fcae0187a885 (diff)
downloadpython-openstackclient-fff4a1cd23057160af13f157a6fde2c172fae7a9.tar.gz
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
Diffstat (limited to 'openstackclient/common/clientmanager.py')
-rw-r--r--openstackclient/common/clientmanager.py5
1 files changed, 4 insertions, 1 deletions
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