Remove domain role from cinder service user
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 user 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 cinder user 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 cinder user is to be created in the Default domain). Change-Id: I3d3cad8f870f80b577ded04588c401c27c62fbc8
This commit is contained in:
parent
e5e8bb9326
commit
54f8d6d917
@ -80,6 +80,7 @@ end
|
||||
# Register Service User
|
||||
openstack_user service_user do
|
||||
project_name service_project_name
|
||||
domain_name service_domain_name
|
||||
password service_pass
|
||||
connection_params connection_params
|
||||
end
|
||||
@ -91,10 +92,3 @@ openstack_user service_user do
|
||||
connection_params connection_params
|
||||
action :grant_role
|
||||
end
|
||||
|
||||
openstack_user service_user do
|
||||
domain_name service_domain_name
|
||||
role_name service_role
|
||||
connection_params connection_params
|
||||
action :grant_domain
|
||||
end
|
||||
|
@ -73,22 +73,13 @@ describe 'openstack-block-storage::identity_registration' do
|
||||
expect(chef_run).to create_openstack_user(
|
||||
service_user
|
||||
).with(
|
||||
domain_name: domain_name,
|
||||
project_name: project_name,
|
||||
password: password,
|
||||
connection_params: connection_params
|
||||
)
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to grant_domain_openstack_user(
|
||||
service_user
|
||||
).with(
|
||||
domain_name: domain_name,
|
||||
role_name: role_name,
|
||||
connection_params: connection_params
|
||||
)
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to grant_role_openstack_user(
|
||||
service_user
|
||||
|
Loading…
Reference in New Issue
Block a user