Remove domain role from tempest 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 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 tempest 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 tempest users are to be created in the Default domain). Change-Id: I345826bc3dae80d25b8f8826c63c5914cf1c2db5
This commit is contained in:
parent
9bd4339b3b
commit
4c44ad5817
|
@ -74,6 +74,7 @@ connection_params = {
|
|||
|
||||
openstack_user service_user do
|
||||
project_name service_project
|
||||
domain_name service_domain
|
||||
password service_pass
|
||||
connection_params connection_params
|
||||
end
|
||||
|
@ -84,14 +85,6 @@ connection_params = {
|
|||
connection_params connection_params
|
||||
action :grant_role
|
||||
end
|
||||
|
||||
openstack_user service_user do
|
||||
domain_name service_domain
|
||||
role_name service_role
|
||||
user_name service_user
|
||||
connection_params connection_params
|
||||
action :grant_domain
|
||||
end
|
||||
end
|
||||
|
||||
heat_stack_user_role = node['openstack']['integration-test']['heat_stack_user_role']
|
||||
|
|
|
@ -40,6 +40,7 @@ describe 'openstack-integration-test::setup' do
|
|||
expect(chef_run).to create_openstack_user(
|
||||
'tempest_user1'
|
||||
).with(
|
||||
domain_name: 'Default',
|
||||
project_name: 'tempest_project1',
|
||||
password: 'tempest_user1_pass',
|
||||
connection_params: connection_params
|
||||
|
@ -54,16 +55,6 @@ describe 'openstack-integration-test::setup' do
|
|||
)
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to grant_domain_openstack_user(
|
||||
'tempest_user1'
|
||||
).with(
|
||||
domain_name: 'Default',
|
||||
role_name: 'Member',
|
||||
connection_params: connection_params
|
||||
)
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to grant_role_openstack_user(
|
||||
'tempest_user1'
|
||||
|
@ -87,22 +78,13 @@ describe 'openstack-integration-test::setup' do
|
|||
expect(chef_run).to create_openstack_user(
|
||||
'tempest_user2'
|
||||
).with(
|
||||
domain_name: 'Default',
|
||||
project_name: 'tempest_project2',
|
||||
password: 'tempest_user2_pass',
|
||||
connection_params: connection_params
|
||||
)
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to grant_domain_openstack_user(
|
||||
'tempest_user2'
|
||||
).with(
|
||||
domain_name: 'Default',
|
||||
role_name: 'Member',
|
||||
connection_params: connection_params
|
||||
)
|
||||
end
|
||||
|
||||
it do
|
||||
expect(chef_run).to grant_role_openstack_user(
|
||||
'tempest_user2'
|
||||
|
|
Loading…
Reference in New Issue