diff options
author | Zuul <zuul@review.opendev.org> | 2020-06-17 22:41:58 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2020-06-17 22:41:58 +0000 |
commit | b63d9a3e96663753f643df41a420b1228210f9fa (patch) | |
tree | f01fa9ae18a7bcdfaab13d902fd73629049a6e7b /swiftclient/shell.py | |
parent | 7852314b0bb591cdf5040b2d2466b959c222bb5a (diff) | |
parent | 257a7185a8d5fdc11d91058f1735fa4273719aa9 (diff) | |
download | python-swiftclient-b63d9a3e96663753f643df41a420b1228210f9fa.tar.gz |
Merge "Application credential support follow-up"
Diffstat (limited to 'swiftclient/shell.py')
-rwxr-xr-x | swiftclient/shell.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/swiftclient/shell.py b/swiftclient/shell.py index 0fef755..b129d63 100755 --- a/swiftclient/shell.py +++ b/swiftclient/shell.py @@ -1651,7 +1651,12 @@ def parse_args(parser, args, enforce_requires=True): return options, args if enforce_requires: - if options['os_auth_type'] == 'v3applicationcredential': + if options['os_auth_type'] and options['os_auth_type'] not in ( + 'password', 'v1password', 'v2password', 'v3password', + 'v3applicationcredential'): + exit('Only "v3applicationcredential" is supported for ' + '--os-auth-type') + elif options['os_auth_type'] == 'v3applicationcredential': if not (options['os_application_credential_id'] and options['os_application_credential_secret']): exit('Auth version 3 (application credential) requires ' @@ -1659,9 +1664,6 @@ def parse_args(parser, args, enforce_requires=True): 'OS_APPLICATION_CREDENTIAL_SECRET to be set or ' 'overridden with --os-application-credential-id and ' '--os-application-credential-secret respectively.') - elif options['os_auth_type']: - exit('Only "v3applicationcredential" is supported for ' - '--os-auth-type') elif options['auth_version'] == '3': if not options['auth']: exit('Auth version 3 requires OS_AUTH_URL to be set or ' |