Force auth_strategy=keystone if --auth_url or OS_AUTH_URL is set

Change-Id: I316f501ffbad1f182a7c1f6a18641c608c0f2ea8
This commit is contained in:
Dean Troyer 2012-02-08 15:21:04 -06:00
parent e4db87ce4c
commit 9c2c97f360

View File

@ -731,6 +731,10 @@ def get_client(options):
specified by the --host and --port options
supplied to the CLI
"""
if options.auth_url or os.getenv('OS_AUTH_URL'):
force_strategy = 'keystone'
else:
force_strategy = None
creds = dict(username=options.username or \
os.getenv('OS_AUTH_USER', os.getenv('OS_USERNAME')),
password=options.password or \
@ -739,7 +743,7 @@ def get_client(options):
os.getenv('OS_AUTH_TENANT',
os.getenv('OS_TENANT_NAME')),
auth_url=options.auth_url or os.getenv('OS_AUTH_URL'),
strategy=options.auth_strategy or \
strategy=force_strategy or options.auth_strategy or \
os.getenv('OS_AUTH_STRATEGY', 'noauth'))
use_ssl = (options.use_ssl or (