From 8668f2632a3de46d1d8f69c2749d1e498bb5c7e3 Mon Sep 17 00:00:00 2001 From: 0weng Date: Fri, 23 Jan 2026 14:58:46 -0800 Subject: [PATCH] Identity: Use project's domain for its parent When creating or listing projects, search for parent project in the same domain as the child project. Change-Id: I1912f06df353a64eb0573f080ac9ab067cb90632 Signed-off-by: 0weng --- openstackclient/identity/v3/project.py | 5 ++++- .../use-project-domain-for-parent-cb29ee3f5adeb647.yaml | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/use-project-domain-for-parent-cb29ee3f5adeb647.yaml 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.