Merge "Fix token_endpoint usage"
This commit is contained in:
commit
f8c2701135
@ -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
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user