File tree Expand file tree Collapse file tree
openstackclient/identity/v3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,11 +231,22 @@ def take_action(self, parsed_args):
231231 endpoint = None
232232 if parsed_args .endpoint :
233233 endpoint = identity_client .find_endpoint (parsed_args .endpoint )
234- project = None
234+
235+ project_domain_id = None
236+ if parsed_args .project_domain :
237+ project_domain_id = common ._find_sdk_id (
238+ identity_client .find_domain ,
239+ name_or_id = parsed_args .project_domain ,
240+ )
241+
242+ project_id = None
235243 if parsed_args .project :
236- project = identity_client .find_project (
237- parsed_args .project ,
238- parsed_args .project_domain ,
244+ project_id = common ._find_sdk_id (
245+ identity_client .find_project ,
246+ name_or_id = common ._get_token_resource (
247+ identity_client , 'project' , parsed_args .project
248+ ),
249+ domain_id = project_domain_id ,
239250 )
240251
241252 if endpoint :
@@ -273,9 +284,9 @@ def take_action(self, parsed_args):
273284 region = identity_client .get_region (parsed_args .region )
274285 kwargs ['region_id' ] = region .id
275286
276- if project :
287+ if project_id :
277288 data = list (
278- identity_client .project_endpoints (project = project . id )
289+ identity_client .project_endpoints (project = project_id )
279290 )
280291 else :
281292 data = list (identity_client .endpoints (** kwargs ))
You can’t perform that action at this time.
0 commit comments