summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Luethi <rl@patchworkscience.org>2017-11-09 13:59:39 +0100
committerRoger Luethi <rl@patchworkscience.org>2017-11-13 15:08:49 +0000
commit88c718d574e993e350b90316e4edad205e6bf90b (patch)
tree869c556a8c31f646f2598bfbe683941ca24433b1
parent9ad24ffd47d236e566533078cbcec167d4f2ba01 (diff)
Remove domain role from ceilometer, gnocchi service users
This patch removes the openstack_user resource with :grant_domain action. A user is always created within a specific domain; such a membership cannot be tacked on later. This resource gave the users the role intended for their project for the domain (i.e., for the Default domain instead of for the service project). We add the domain_name attribute that creates the users in the desired domain. Note that this change needs a sufficiently recent openstackclient cookbook -- otherwise the domain_name attribute is ignored (which does not matter as long as the users are to be created in the Default domain). Change-Id: Ie793b3d2e0419da90888edbf33ff28d819892dcf
Notes
Notes (review): Code-Review+2: Christoph Albers <c.albers@x-ion.de> Code-Review+2: Samuel Cassiba <s@cassiba.com> Workflow+1: Samuel Cassiba <s@cassiba.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 17 Nov 2017 19:30:40 +0000 Reviewed-on: https://review.openstack.org/519375 Project: openstack/cookbook-openstack-telemetry Branch: refs/heads/master
-rw-r--r--recipes/identity_registration.rb9
-rw-r--r--spec/identity_registration_spec.rb11
2 files changed, 2 insertions, 18 deletions
diff --git a/recipes/identity_registration.rb b/recipes/identity_registration.rb
index 2e4de77..eebb50f 100644
--- a/recipes/identity_registration.rb
+++ b/recipes/identity_registration.rb
@@ -89,6 +89,7 @@ connection_params = {
89 89
90 # Register Service User 90 # Register Service User
91 openstack_user service_user do 91 openstack_user service_user do
92 domain_name service_domain_name
92 project_name service_tenant_name 93 project_name service_tenant_name
93 password service_pass 94 password service_pass
94 connection_params connection_params 95 connection_params connection_params
@@ -101,12 +102,4 @@ connection_params = {
101 connection_params connection_params 102 connection_params connection_params
102 action :grant_role 103 action :grant_role
103 end 104 end
104
105 openstack_user service_user do
106 domain_name service_domain_name
107 role_name service_role
108 user_name service_user
109 connection_params connection_params
110 action :grant_domain
111 end
112end 105end
diff --git a/spec/identity_registration_spec.rb b/spec/identity_registration_spec.rb
index c2f5992..7adca58 100644
--- a/spec/identity_registration_spec.rb
+++ b/spec/identity_registration_spec.rb
@@ -75,6 +75,7 @@ describe 'openstack-telemetry::identity_registration' do
75 expect(chef_run).to create_openstack_user( 75 expect(chef_run).to create_openstack_user(
76 service_user 76 service_user
77 ).with( 77 ).with(
78 domain_name: domain_name,
78 project_name: project_name, 79 project_name: project_name,
79 password: password, 80 password: password,
80 connection_params: connection_params 81 connection_params: connection_params
@@ -82,16 +83,6 @@ describe 'openstack-telemetry::identity_registration' do
82 end 83 end
83 84
84 it do 85 it do
85 expect(chef_run).to grant_domain_openstack_user(
86 service_user
87 ).with(
88 domain_name: domain_name,
89 role_name: role_name,
90 connection_params: connection_params
91 )
92 end
93
94 it do
95 expect(chef_run).to grant_role_openstack_user( 86 expect(chef_run).to grant_role_openstack_user(
96 service_user 87 service_user
97 ).with( 88 ).with(