Unhardcoding project_domain_name and user_domain_name
The patch adds the following logic: if project_domain_name and user_domain_name
parameters are defined then project_domain_id and user_domain_id are not set to
default otherwise these *_name parameter are defined to exact values.
Change-Id: I366f6526cc25b658111e963125faeab91fa8a288
Related-PROD: PROD-34012
diff --git a/oslo_templates/files/queens/keystoneauth/_type_password.conf b/oslo_templates/files/queens/keystoneauth/_type_password.conf
index d4300bc..7c7772c 100644
--- a/oslo_templates/files/queens/keystoneauth/_type_password.conf
+++ b/oslo_templates/files/queens/keystoneauth/_type_password.conf
@@ -85,7 +85,7 @@
# Domain ID containing project (string value)
#project_domain_id = <None>
-{%- if _data.get('project_domain_id','default') %}
+{%- if _data.project_domain_name is not defined %}
project_domain_id = {{ _data.get('project_domain_id','default') }}
{%- endif %}
@@ -130,7 +130,7 @@
# User's domain id (string value)
#user_domain_id = <None>
-{%- if _data.get('user_domain_id','default') %}
+{%- if _data.user_domain_name is not defined %}
user_domain_id = {{ _data.get('user_domain_id','default') }}
{%- endif %}
diff --git a/oslo_templates/files/rocky/keystoneauth/_type_password.conf b/oslo_templates/files/rocky/keystoneauth/_type_password.conf
index d4300bc..7c7772c 100644
--- a/oslo_templates/files/rocky/keystoneauth/_type_password.conf
+++ b/oslo_templates/files/rocky/keystoneauth/_type_password.conf
@@ -85,7 +85,7 @@
# Domain ID containing project (string value)
#project_domain_id = <None>
-{%- if _data.get('project_domain_id','default') %}
+{%- if _data.project_domain_name is not defined %}
project_domain_id = {{ _data.get('project_domain_id','default') }}
{%- endif %}
@@ -130,7 +130,7 @@
# User's domain id (string value)
#user_domain_id = <None>
-{%- if _data.get('user_domain_id','default') %}
+{%- if _data.user_domain_name is not defined %}
user_domain_id = {{ _data.get('user_domain_id','default') }}
{%- endif %}