Use oslo module for configuration

Oslo module has the control_exchange parameters,
so use oslo module to configure it.

Change-Id: I7dcb01c0353ecc6100b3e20da946341e5a01c5bd
This commit is contained in:
ZhongShengping 2016-05-07 12:33:30 +08:00
parent 3e614e4908
commit 5836d3d382
2 changed files with 7 additions and 4 deletions

View File

@ -173,7 +173,7 @@
#
# [*control_exchange*]
# (Optional)
# Defaults to 'openstack'.
# Defaults to $::os_service_default
#
# [*coordination_backend_url*]
# (optional) The backend URL to be used for coordination.
@ -192,7 +192,7 @@ class mistral(
$rpc_backend = $::os_service_default,
$auth_uri = 'http://localhost:5000/',
$identity_uri = 'http://localhost:35357/',
$control_exchange = 'openstack',
$control_exchange = $::os_service_default,
$rabbit_host = $::os_service_default,
$rabbit_port = $::os_service_default,
$rabbit_hosts = $::os_service_default,
@ -241,11 +241,14 @@ class mistral(
'keystone_authtoken/admin_tenant_name': value => $keystone_tenant;
'coordination/backend_url': value => $coordination_backend_url;
'coordination/heartbeat_interval': value => $coordination_heartbeat_interval;
'DEFAULT/control_exchange': value => $control_exchange;
'DEFAULT/report_interval': value => $report_interval;
'DEFAULT/service_down_time': value => $service_down_time;
}
oslo::messaging::default {'mistral_config':
control_exchange => $control_exchange
}
if $rpc_backend in [$::os_service_default, 'rabbit'] {
oslo::messaging::rabbit {'mistral_config':

View File

@ -26,7 +26,7 @@ describe 'mistral' do
it 'should contain default config' do
is_expected.to contain_mistral_config('DEFAULT/rpc_backend').with(:value => 'rabbit')
is_expected.to contain_mistral_config('DEFAULT/control_exchange').with(:value => 'openstack')
is_expected.to contain_mistral_config('DEFAULT/control_exchange').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('DEFAULT/report_interval').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('DEFAULT/service_down_time').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('oslo_messaging_rabbit/rabbit_password').with(:value => '<SERVICE DEFAULT>', :secret => true)