Browse Source

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
changes/75/519375/2
Roger Luethi 1 year ago
parent
commit
88c718d574
2 changed files with 2 additions and 18 deletions
  1. 1
    8
      recipes/identity_registration.rb
  2. 1
    10
      spec/identity_registration_spec.rb

+ 1
- 8
recipes/identity_registration.rb View File

@@ -89,6 +89,7 @@ connection_params = {
89 89
 
90 90
   # Register Service User
91 91
   openstack_user service_user do
92
+    domain_name service_domain_name
92 93
     project_name service_tenant_name
93 94
     password service_pass
94 95
     connection_params connection_params
@@ -101,12 +102,4 @@ connection_params = {
101 102
     connection_params connection_params
102 103
     action :grant_role
103 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
112 105
 end

+ 1
- 10
spec/identity_registration_spec.rb View File

@@ -75,22 +75,13 @@ describe 'openstack-telemetry::identity_registration' do
75 75
         expect(chef_run).to create_openstack_user(
76 76
           service_user
77 77
         ).with(
78
+          domain_name: domain_name,
78 79
           project_name: project_name,
79 80
           password: password,
80 81
           connection_params: connection_params
81 82
         )
82 83
       end
83 84
 
84
-      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 85
       it do
95 86
         expect(chef_run).to grant_role_openstack_user(
96 87
           service_user

Loading…
Cancel
Save