Browse Source

Grant admin role in heat domain to heat_domain_admin

This patch grants heat_domain_admin the admin role in the heat domain
(rather then in the service project).

We use :grant_domain instead of :grant_role, because we are setting a
role in a domain, not in a project.

Note that for the user to actually exist in the heat domain, a
sufficiently recent openstackclient cookbook is required -- otherwise
the domain_name attribute is ignored during user creation.

Also, we remove the user_name attribute (gets ignored by resource
action).

Change-Id: I747e2dedbc517cc3deb2675590fb982459c560a0
Roger Luethi 1 year ago
parent
commit
dc2d594b05
2 changed files with 2 additions and 3 deletions
  1. 1
    2
      recipes/identity_registration.rb
  2. 1
    1
      spec/identity_registration_spec.rb

+ 1
- 2
recipes/identity_registration.rb View File

@@ -163,9 +163,8 @@ end
163 163
 openstack_user stack_domain_admin do
164 164
   domain_name heat_domain_name
165 165
   role_name 'admin'
166
-  user_name stack_domain_admin
167 166
   connection_params connection_params
168
-  action :grant_role
167
+  action :grant_domain
169 168
 end
170 169
 
171 170
 openstack_role 'heat_stack_owner' do

+ 1
- 1
spec/identity_registration_spec.rb View File

@@ -117,7 +117,7 @@ describe 'openstack-orchestration::identity_registration' do
117 117
     end
118 118
 
119 119
     it do
120
-      expect(chef_run).to grant_role_openstack_user(
120
+      expect(chef_run).to grant_domain_openstack_user(
121 121
         stack_domain_admin
122 122
       ).with(
123 123
         domain_name: stack_domain_name,

Loading…
Cancel
Save