Remove redundant default for [DEFAULT] control_exchange

The current default value of cinder::control_exchange equals to
the default value of [DEFAULT] control_exchange. This change makes
the service default used instead of redundant one hard-coded in
puppet layer.

Co-Authoered-By: Bogdan Dobrelya <bdobreli@redhat.com>
Change-Id: Ifd86d3ee30079d310269e7a954719246ec0dcdfd
This commit is contained in:
Takashi Kajinami
2021-12-08 20:15:49 +09:00
parent 4dfd69c5b3
commit 5e9d8e45fc
2 changed files with 13 additions and 3 deletions

View File

@@ -20,7 +20,7 @@
#
# [*control_exchange*]
# (Optional)
# Defaults to 'openstack'.
# Defaults to $::os_service_default
#
# [*notification_transport_url*]
# (Optional) A URL representing the messaging driver to use for notifications
@@ -299,7 +299,7 @@
class cinder (
$default_transport_url = $::os_service_default,
$rpc_response_timeout = $::os_service_default,
$control_exchange = 'openstack',
$control_exchange = $::os_service_default,
$notification_transport_url = $::os_service_default,
$notification_driver = $::os_service_default,
$notification_topics = $::os_service_default,

View File

@@ -20,7 +20,7 @@ describe 'cinder' do
it {
is_expected.to contain_cinder_config('DEFAULT/transport_url').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('DEFAULT/rpc_response_timeout').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('DEFAULT/control_exchange').with(:value => 'openstack')
is_expected.to contain_cinder_config('DEFAULT/control_exchange').with(:value => '<SERVICE DEFAULT>')
}
it { is_expected.to contain_oslo__messaging__notifications('cinder_config').with(
@@ -237,6 +237,16 @@ describe 'cinder' do
it { is_expected.to contain_cinder_config('DEFAULT/transport_url').with_value('rabbit://rabbit_user:password@localhost:5673') }
end
context 'with control_exchange' do
let :params do
req_params.merge({
:control_exchange => 'cinder',
})
end
it { is_expected.to contain_cinder_config('DEFAULT/control_exchange').with_value('cinder') }
end
context 'with notifications' do
let :params do
req_params.merge({