Fix swiftclient 400 error when OS_AUTH_URL is set.
Description: The swift command tool will set the auth version to 2 if OS_AUTH_URL is set even use -V 1 option to set Version to 1.So when use nova/glance client and swift client in the same shell, and export environment OS_AUTH_URL, it will lead swift client to raise 400 error if swift not use keystone for auth. Fixes bug 1034158 Change-Id: I8003ff2ad4ac25fd710f87c4dab1507f6040ed3d
This commit is contained in:
parent
46aad0e8fb
commit
8e2e97fd75
@ -999,8 +999,7 @@ def parse_args(parser, args, enforce_requires=True):
|
||||
args = ['-h']
|
||||
(options, args) = parser.parse_args(args)
|
||||
|
||||
if (not (options.auth and options.user and options.key) or
|
||||
options.os_auth_url):
|
||||
if (not (options.auth and options.user and options.key)):
|
||||
# Use 2.0 auth if none of the old args are present
|
||||
options.auth_version = '2.0'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user