Add ability to set custom keystone user name
Add ability to set custom keystone users names
for keystonev3.
Example:
keystone:
client:
resources:
v3:
users:
nova:
name: ${_param:keystone_nova_username}
password: ${_param:keystone_nova_password}
email: ${_param:admin_email}
options: ${_param:openstack_service_user_options}
Change-Id: I6d63c2cf745e26e4293dfb1e224f11e3a5a0fe41
Related-Prod: PROD-29868
diff --git a/keystone/client/resources/v3.sls b/keystone/client/resources/v3.sls
index 8cac028..f276b23 100644
--- a/keystone/client/resources/v3.sls
+++ b/keystone/client/resources/v3.sls
@@ -153,7 +153,7 @@
keystone_user_{{ user_name }}:
keystonev3.user_present:
- cloud_name: {{ user.get('cloud_name', resources.cloud_name) }}
- - name: {{ user_name }}
+ - name: {{ user.get('name', user_name) }}
{%- if user.default_project_id is defined %}
- default_project_id: {{ user.default_project_id }}
{%- endif %}
@@ -193,7 +193,7 @@
keystone_user_{{ user_name }}_absent:
keystonev3.user_absent:
- cloud_name: {{ user.get('cloud_name', resources.cloud_name) }}
- - name: {{ user_name }}
+ - name: {{ user.get('name', user_name) }}
{%- endif %}
@@ -202,7 +202,7 @@
keystone_user_{{ user_name }}_role_{{ role.name }}_assigned:
keystonev3.user_role_assigned:
- - name: {{ user_name }}
+ - name: {{ user.get('name', user_name) }}
- role_id: {{ role.name }}
- cloud_name: {{ user.get('cloud_name', resources.cloud_name) }}
{%- if role.domain_id is defined %}
@@ -221,7 +221,7 @@
keystone_user_{{ user_name }}_role_{{ role.name }}_unassign:
keystonev3.user_role_unassign:
- - name: {{ user_name }}
+ - name: {{ user.get('name', user_name) }}
- role_id: {{ role.name }}
- cloud_name: {{ user.get('cloud_name', resources.cloud_name) }}
{%- if role.domain_id is defined %}