Merge "Check for auth URL before password (bug 1076235)"
This commit is contained in:
@@ -310,6 +310,11 @@ class OpenStackIdentityShell(object):
|
|||||||
'Expecting a username provided via either '
|
'Expecting a username provided via either '
|
||||||
'--os-username or env[OS_USERNAME]')
|
'--os-username or env[OS_USERNAME]')
|
||||||
|
|
||||||
|
if not args.os_auth_url:
|
||||||
|
raise exc.CommandError(
|
||||||
|
'Expecting an auth URL via either --os-auth-url or '
|
||||||
|
'env[OS_AUTH_URL]')
|
||||||
|
|
||||||
if not args.os_password:
|
if not args.os_password:
|
||||||
# No password, If we've got a tty, try prompting for it
|
# No password, If we've got a tty, try prompting for it
|
||||||
if hasattr(sys.stdin, 'isatty') and sys.stdin.isatty():
|
if hasattr(sys.stdin, 'isatty') and sys.stdin.isatty():
|
||||||
@@ -326,11 +331,6 @@ class OpenStackIdentityShell(object):
|
|||||||
'--os-password, env[OS_PASSWORD], or '
|
'--os-password, env[OS_PASSWORD], or '
|
||||||
'prompted response')
|
'prompted response')
|
||||||
|
|
||||||
if not args.os_auth_url:
|
|
||||||
raise exc.CommandError(
|
|
||||||
'Expecting an auth URL via either --os-auth-url or '
|
|
||||||
'env[OS_AUTH_URL]')
|
|
||||||
|
|
||||||
# if it looks like the user wants to provide a service token
|
# if it looks like the user wants to provide a service token
|
||||||
# but is missing something
|
# but is missing something
|
||||||
if args.os_token or args.os_endpoint and not (
|
if args.os_token or args.os_endpoint and not (
|
||||||
|
Reference in New Issue
Block a user