Make user creation optional when creating service.

In some cases it is useful to be able to just configure
the service in Keystone and not the service user. This
is the case when e.g. a read only LDAP backend is used.
Added a parameter configure_user (defaults to true).
Closes-Bug: 1360232

Change-Id: Ia17fa32744bd951eac3307a858917ac1ba3be37c
This commit is contained in:
Mike Dorman
2014-09-10 11:06:43 -05:00
parent a95a9435dc
commit c1102fd5e3
4 changed files with 144 additions and 56 deletions

View File

@@ -99,4 +99,37 @@ describe 'heat::keystone::auth_cfn' do
end
end
context 'when disabling user configuration' do
before do
params.merge!( :configure_user => false )
end
it { should_not contain_keystone_user('heat_cfn') }
it { should contain_keystone_user_role('heat-cfn@services') }
it { should contain_keystone_service('heat-cfn').with(
:ensure => 'present',
:type => 'cloudformation',
:description => 'Openstack Cloudformation Service'
)}
end
context 'when disabling user and role configuration' do
before do
params.merge!(
:configure_user => false,
:configure_user_role => false
)
end
it { should_not contain_keystone_user('heat_cfn') }
it { should_not contain_keystone_user_role('heat-cfn@services') }
it { should contain_keystone_service('heat-cfn').with(
:ensure => 'present',
:type => 'cloudformation',
:description => 'Openstack Cloudformation Service'
)}
end
end