Merge "Fix token_endpoint usage"

This commit is contained in:
Jenkins 2015-12-30 08:28:33 +00:00 committed by Gerrit Code Review
commit f8c2701135
2 changed files with 2 additions and 2 deletions

View File

@ -885,7 +885,6 @@ class OpenStackConfig(object):
if (('auth' in config and 'token' in config['auth']) or
('auth_token' in config and config['auth_token']) or
('token' in config and config['token'])):
config['auth_type'] = 'token'
config.setdefault('token', config.pop('auth_token', None))
# These backwards compat values are only set via argparse. If it's

View File

@ -489,7 +489,8 @@ class TestConfigArgparse(base.TestCase):
# novaclient will add this
parser.add_argument('--os-auth-token')
opts, _remain = parser.parse_known_args(
['--os-auth-token', 'very-bad-things'])
['--os-auth-token', 'very-bad-things',
'--os-auth-type', 'token'])
cc = c.get_one_cloud(argparse=opts)
self.assertEqual(cc.config['auth_type'], 'token')
self.assertEqual(cc.config['auth']['token'], 'very-bad-things')