Add notification_driver and notification_topics option
Add notification_driver to configure driver or drivers for handling sending notifications. Add notification_topics to configure AMQP topic used for OpenStack notifications. Change-Id: If950332037daddba378fc1269ac74e4495c8c383
This commit is contained in:
parent
5f7aada66b
commit
70101e913f
|
@ -29,6 +29,15 @@
|
|||
# example rabbit url would be, rabbit://user:pass@host:port/virtual_host
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*notification_driver*]
|
||||
# (Optional) Driver or drivers to handle sending notifications.
|
||||
# Value can be a string or a list.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*notification_topics*]
|
||||
# (optional) AMQP topic used for OpenStack notifications
|
||||
# Defaults to ::os_service_default
|
||||
#
|
||||
# [*rabbit_heartbeat_timeout_threshold*]
|
||||
# (optional) Number of seconds after which the RabbitMQ broker is considered
|
||||
# down if the heartbeat keepalive fails. Any value >0 enables heartbeats.
|
||||
|
@ -206,6 +215,8 @@ class congress(
|
|||
$rpc_response_timeout = $::os_service_default,
|
||||
$control_exchange = $::os_service_default,
|
||||
$notification_transport_url = $::os_service_default,
|
||||
$notification_driver = $::os_service_default,
|
||||
$notification_topics = $::os_service_default,
|
||||
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
|
||||
$rabbit_heartbeat_rate = $::os_service_default,
|
||||
$rabbit_use_ssl = $::os_service_default,
|
||||
|
@ -325,5 +336,7 @@ deprecated. Please use congress::default_transport_url instead.")
|
|||
|
||||
oslo::messaging::notifications { 'congress_config':
|
||||
transport_url => $notification_transport_url,
|
||||
driver => $notification_driver,
|
||||
topics => $notification_topics,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
features:
|
||||
- Add new parameter "notification_topics", AMQP topic used
|
||||
for OpenStack notifications.
|
||||
- Add new parameter "notification_driver", driver or drivers to
|
||||
handle sending notifications. Value can be a string or a list.
|
|
@ -38,6 +38,8 @@ describe 'congress' do
|
|||
end
|
||||
|
||||
it { is_expected.to contain_oslo__messaging__notifications('congress_config').with(:transport_url => '<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_oslo__messaging__notifications('congress_config').with(:topics => '<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_oslo__messaging__notifications('congress_config').with(:driver => '<SERVICE DEFAULT>') }
|
||||
end
|
||||
|
||||
context 'with overridden parameters' do
|
||||
|
@ -123,13 +125,19 @@ describe 'congress' do
|
|||
|
||||
context 'with notification_transport_url parameter' do
|
||||
let :params do
|
||||
{ :notification_transport_url => 'rabbit://user:pass@host:1234/virtualhost' }
|
||||
{
|
||||
:notification_transport_url => 'rabbit://user:pass@host:1234/virtualhost',
|
||||
:notification_topics => 'openstack',
|
||||
:notification_driver => 'messagingv1',
|
||||
}
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_oslo__messaging__notifications('congress_config').with(
|
||||
:transport_url => 'rabbit://user:pass@host:1234/virtualhost'
|
||||
)
|
||||
is_expected.to contain_oslo__messaging__notifications('congress_config').with(:topics => 'openstack')
|
||||
is_expected.to contain_oslo__messaging__notifications('congress_config').with(:driver => 'messagingv1')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue