Make configuring the service optional.

Even if the endpoint is disabled the service will always be created.
Make this settable like the endpoint.

Change-Id: I7a4f7c660c1ce857f936156a0e3d2bb419571759
This commit is contained in:
Matt Fischer 2015-02-25 09:56:06 -07:00
parent 4fd2ce2d82
commit 0993b23eeb
4 changed files with 33 additions and 0 deletions

View File

@ -18,6 +18,10 @@
# (Optional) Should heat endpoint be configured?
# Defaults to 'true'.
#
# [*configure_service*]
# (Optional) Should heat service be configured?
# Defaults to 'true'.
#
# [*configure_user*]
# (Optional) Whether to create the service user.
# Defaults to 'true'.
@ -104,6 +108,7 @@ class heat::keystone::auth (
$admin_protocol = 'http',
$internal_protocol = 'http',
$configure_endpoint = true,
$configure_service = true,
$configure_user = true,
$configure_user_role = true,
$trusts_delegated_roles = ['heat_stack_owner'],
@ -122,6 +127,7 @@ class heat::keystone::auth (
configure_user => $configure_user,
configure_user_role => $configure_user_role,
configure_endpoint => $configure_endpoint,
configure_service => $configure_service,
service_type => $service_type,
service_description => 'Openstack Orchestration Service',
service_name => $real_service_name,

View File

@ -18,6 +18,10 @@
# (Optional) Should heat-cfn endpoint be configured?
# Defaults to 'true'.
#
# [*configure_service*]
# (Optional) Should heat-cfn service be configured?
# Defaults to 'true'.
#
# [*configure_user*]
# (Optional) Whether to create the service user.
# Defaults to 'true'.
@ -91,6 +95,7 @@ class heat::keystone::auth_cfn (
$admin_protocol = 'http',
$internal_protocol = 'http',
$configure_endpoint = true,
$configure_service = true,
$configure_user = true,
$configure_user_role = true,
) {
@ -107,6 +112,7 @@ class heat::keystone::auth_cfn (
configure_user => $configure_user,
configure_user_role => $configure_user_role,
configure_endpoint => $configure_endpoint,
configure_service => $configure_service,
service_type => $service_type,
service_description => 'Openstack Cloudformation Service',
service_name => $real_service_name,

View File

@ -8,6 +8,7 @@ describe 'heat::keystone::auth_cfn' do
:email => 'heat-cfn@localhost',
:auth_name => 'heat-cfn',
:configure_endpoint => true,
:configure_service => true,
:service_type => 'cloudformation',
:public_address => '127.0.0.1',
:admin_address => '127.0.0.1',
@ -61,6 +62,16 @@ describe 'heat::keystone::auth_cfn' do
:internal_url => "#{params[:internal_protocol]}://#{params[:internal_address]}:#{params[:port]}/#{params[:version]}/"
)
end
context 'with service disabled' do
before do
params.merge!({
:configure_service => false
})
end
it { should_not contain_keystone_service("#{params[:region]}/#{params[:auth_name]}") }
end
end
context 'on Debian platforms' do

View File

@ -69,6 +69,16 @@ describe 'heat::keystone::auth' do
:internal_url => "#{params[:internal_protocol]}://#{params[:internal_address]}:#{params[:port]}/#{params[:version]}/%(tenant_id)s"
)
end
context 'with service disabled' do
before do
params.merge!({
:configure_service => false
})
end
it { should_not contain_keystone_service("#{params[:region]}/#{params[:auth_name]}") }
end
end