diff --git a/openstackclient/identity/v3/project.py b/openstackclient/identity/v3/project.py index 7c27bb7181..99242391fe 100644 --- a/openstackclient/identity/v3/project.py +++ b/openstackclient/identity/v3/project.py @@ -137,6 +137,7 @@ class CreateProject(command.ShowOne): kwargs['parent_id'] = common.find_project_id_sdk( identity_client, parsed_args.parent, + domain_name_or_id=domain, ) kwargs['is_enabled'] = parsed_args.enabled @@ -310,7 +311,9 @@ class ListProject(command.Lister): if parsed_args.parent: parent_id = common.find_project_id_sdk( - identity_client, parsed_args.parent + identity_client, + parsed_args.parent, + domain_name_or_id=domain_id, ) kwargs['parent_id'] = parent_id diff --git a/releasenotes/notes/use-project-domain-for-parent-cb29ee3f5adeb647.yaml b/releasenotes/notes/use-project-domain-for-parent-cb29ee3f5adeb647.yaml new file mode 100644 index 0000000000..acbf2ba6cf --- /dev/null +++ b/releasenotes/notes/use-project-domain-for-parent-cb29ee3f5adeb647.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + When creating or listing projects, parent project will now be searched from + the same domain as the child project.