summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorDavid Rabel <rabel@b1-systems.de>2017-05-15 18:11:37 +0200
committerDavid Rabel <rabel@b1-systems.de>2017-05-23 17:16:41 +0200
commit0ad6b6b2e0b26ebc93a99730bcc414bf8e091759 (patch)
treee439acaf46be3e4875e3604abe76b07e111bde6c /openstackclient
parent0181de38afc8cc4b96f226b00e173fb0c0d2e4dc (diff)
downloadpython-openstackclient-0ad6b6b2e0b26ebc93a99730bcc414bf8e091759.tar.gz
Use _get_token_resource in role assignment list
If project matches the project from access token, we do not have to send an API request to /projects?name=..., because the project ID is already known. This API request may require additional permissions, so we want to avoid it, if possible. Change-Id: Ice1af8686bceea6b67229dcab7cf82eef821163e Closes-Bug: #1658189
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/identity/v3/role_assignment.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/openstackclient/identity/v3/role_assignment.py b/openstackclient/identity/v3/role_assignment.py
index 9da050de..a362adb0 100644
--- a/openstackclient/identity/v3/role_assignment.py
+++ b/openstackclient/identity/v3/role_assignment.py
@@ -128,7 +128,8 @@ class ListRoleAssignment(command.Lister):
if parsed_args.project:
project = common.find_project(
identity_client,
- parsed_args.project,
+ common._get_token_resource(identity_client, 'project',
+ parsed_args.project),
parsed_args.project_domain,
)
elif parsed_args.authproject: