@@ -89,12 +89,12 @@ def _get_attrs(
8989 attrs ['description' ] = parsed_args .description
9090
9191 if parsed_args .project :
92- identity_client = client_manager .identity
93- project_id = identity_common .find_project (
92+ identity_client = client_manager .sdk_connection . identity
93+ project_id = identity_common .find_project_id_sdk (
9494 identity_client ,
9595 parsed_args .project ,
9696 parsed_args .project_domain ,
97- ). id
97+ )
9898 attrs ['project_id' ] = project_id
9999
100100 if parsed_args .dns_domain :
@@ -319,7 +319,6 @@ def take_action(
319319 self , parsed_args : argparse .Namespace
320320 ) -> tuple [Sequence [str ], Iterable [Any ]]:
321321 network_client = self .app .client_manager .network
322- identity_client = self .app .client_manager .identity
323322
324323 columns : tuple [str , ...] = (
325324 'id' ,
@@ -355,7 +354,7 @@ def take_action(
355354 'DNS Domain' ,
356355 )
357356
358- query = {}
357+ query : dict [ str , object ] = {}
359358
360359 if parsed_args .networks is not None :
361360 network_ids = []
@@ -385,12 +384,13 @@ def take_action(
385384 query ['status' ] = parsed_args .status
386385
387386 if parsed_args .project is not None :
388- project = identity_common .find_project (
387+ identity_client = self .app .client_manager .sdk_connection .identity
388+ project_id = identity_common .find_project_id_sdk (
389389 identity_client ,
390390 parsed_args .project ,
391391 parsed_args .project_domain ,
392392 )
393- query ['project_id' ] = project . id
393+ query ['project_id' ] = project_id
394394
395395 if parsed_args .routers is not None :
396396 router_ids = []
0 commit comments