Support unscoped token request

Make scope check optional for the "token issue" command as unscoped token is
a valid Keystone V2/V3 API.

Change-Id: Ie1cded4dbfdafd3a78c0ebdf89e3f66762509930
Closes-Bug: #1543214
This commit is contained in:
guang-yee
2016-02-08 11:16:24 -08:00
parent ab6ba385a2
commit 41e1bd0be6
11 changed files with 125 additions and 6 deletions

@ -353,6 +353,9 @@ class OpenStackShell(app.App):
cmd.__class__.__name__,
)
if cmd.auth_required:
if hasattr(cmd, 'required_scope'):
# let the command decide whether we need a scoped token
self.client_manager.setup_auth(cmd.required_scope)
# Trigger the Identity client to initialize
self.client_manager.auth_ref
return