From 9c2c97f3602204890ed3c911e5bde94eea3357d0 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Wed, 8 Feb 2012 15:21:04 -0600 Subject: [PATCH] Force auth_strategy=keystone if --auth_url or OS_AUTH_URL is set Change-Id: I316f501ffbad1f182a7c1f6a18641c608c0f2ea8 --- bin/glance | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/glance b/bin/glance index 86b3387b12..fd44f24886 100755 --- a/bin/glance +++ b/bin/glance @@ -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 (