From 66931c6931ee39cc58159d3823b46ad225f39ec8 Mon Sep 17 00:00:00 2001 From: Jude Job Date: Tue, 29 Dec 2015 17:23:42 +0530 Subject: Enabling domain lookup for project set v3 command Currently the domain option for `project set` attempts to set a new domain that owns the project. This is actually an action that is denied by keystone server. Instead, the domain option should be used as a lookup, to find projects that exist in the non-default domain. Co-Authored-By: Steve Martinelli Closes-Bug: #1524456 Change-Id: I30a3812184fe262667e09baa106d2275c2cbb981 --- openstackclient/identity/v3/project.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'openstackclient/identity') diff --git a/openstackclient/identity/v3/project.py b/openstackclient/identity/v3/project.py index f87105dd..22745aa4 100644 --- a/openstackclient/identity/v3/project.py +++ b/openstackclient/identity/v3/project.py @@ -283,16 +283,12 @@ class SetProject(command.Command): and not parsed_args.disable): return - project = utils.find_resource( - identity_client.projects, - parsed_args.project, - ) + project = common.find_project(identity_client, parsed_args.project, + parsed_args.domain) kwargs = {} if parsed_args.name: kwargs['name'] = parsed_args.name - if parsed_args.domain: - kwargs['domain'] = parsed_args.domain if parsed_args.description: kwargs['description'] = parsed_args.description if parsed_args.enable: -- cgit v1.2.1