Add oslo_messaging_notifications support
Adding the ability to configure the oslo_messaging_notifications settings. Change-Id: Ic52db4a96187438e0c8f8d4ebdc3d7bde3523c1e
This commit is contained in:
parent
868a799734
commit
c684aea79e
@ -46,6 +46,19 @@
|
||||
# would be, rabbit://user:pass@host:port/virtual_host
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*notification_transport_url*]
|
||||
# (optional) Connection url for oslo messaging notifications backend. An
|
||||
# example rabbit url would be, rabbit://user:pass@host:port/virtual_host
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*notification_driver*]
|
||||
# (optional) Driver to use for oslo messaging notifications backend.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*notification_topics*]
|
||||
# (optional) Topics to use for oslo messaging notifications backend.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_use_ssl*]
|
||||
# (optional) Connect over SSL for RabbitMQ
|
||||
# Defaults to $::os_service_default
|
||||
@ -236,6 +249,9 @@ class barbican::api (
|
||||
$max_allowed_request_size_in_bytes = $::os_service_default,
|
||||
$rpc_backend = $::os_service_default,
|
||||
$default_transport_url = $::os_service_default,
|
||||
$notification_transport_url = $::os_service_default,
|
||||
$notification_driver = $::os_service_default,
|
||||
$notification_topics = $::os_service_default,
|
||||
$rabbit_use_ssl = $::os_service_default,
|
||||
$rabbit_heartbeat_timeout_threshold = $::os_service_default,
|
||||
$rabbit_heartbeat_rate = $::os_service_default,
|
||||
@ -355,6 +371,12 @@ deprecated. Please use barbican::default_transport_url instead.")
|
||||
transport_url => $default_transport_url,
|
||||
}
|
||||
|
||||
oslo::messaging::notifications { 'barbican_config':
|
||||
driver => $notification_driver,
|
||||
transport_url => $notification_transport_url,
|
||||
topics => $notification_topics,
|
||||
}
|
||||
|
||||
# queue options
|
||||
barbican_config {
|
||||
'queue/enable': value => $enable_queue;
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- Add the ability to configure the oslo messaging notification options
|
||||
via barbican::api::notification_transport_url,
|
||||
barbican::api::notification_driver, and barbican::api::notification_topics
|
@ -29,6 +29,9 @@ describe 'barbican::api' do
|
||||
:bind_port => '9311',
|
||||
:rpc_backend => 'rabbit',
|
||||
:default_transport_url => '<SERVICE DEFAULT>',
|
||||
:notification_transport_url => '<SERVICE DEFAULT>',
|
||||
:notification_driver => '<SERVICE DEFAULT>',
|
||||
:notification_topics => '<SERVICE DEFAULT>',
|
||||
:rabbit_host => '<SERVICE_DEFAULT>',
|
||||
:rabbit_hosts => ['<SERVICE DEFAULT>'],
|
||||
:rabbit_password => '<SERVICE DEFAULT>',
|
||||
@ -71,6 +74,9 @@ describe 'barbican::api' do
|
||||
:bind_port => '9312',
|
||||
:rpc_backend => 'rabbit',
|
||||
:default_transport_url => 'rabbit://bugs:bugs_bunny@localhost:1234/rabbithost',
|
||||
:notification_transport_url => 'rabbit://bugs:bugs_bunny@localhost:1234/rabbithost',
|
||||
:notification_driver => 'kombu',
|
||||
:notification_topics => 'notifications',
|
||||
:rabbit_host => 'rabbithost',
|
||||
:rabbit_hosts => ['rabbithost:1234'],
|
||||
:rabbit_password => 'bugs_bunny',
|
||||
@ -153,6 +159,9 @@ describe 'barbican::api' do
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_barbican_config('DEFAULT/rpc_backend').with_value(param_hash[:rpc_backend])
|
||||
is_expected.to contain_barbican_config('DEFAULT/transport_url').with_value(param_hash[:default_transport_url])
|
||||
is_expected.to contain_barbican_config('oslo_messaging_notifications/transport_url').with_value(param_hash[:notification_transport_url])
|
||||
is_expected.to contain_barbican_config('oslo_messaging_notifications/driver').with_value(param_hash[:notification_driver])
|
||||
is_expected.to contain_barbican_config('oslo_messaging_notifications/topics').with_value(param_hash[:notification_topics])
|
||||
is_expected.to contain_barbican_config('oslo_messaging_rabbit/rabbit_hosts').with_value(param_hash[:rabbit_hosts])
|
||||
is_expected.to contain_barbican_config('oslo_messaging_rabbit/rabbit_password').with_value(param_hash[:rabbit_password]).with_secret(true)
|
||||
is_expected.to contain_barbican_config('oslo_messaging_rabbit/rabbit_userid').with_value(param_hash[:rabbit_userid])
|
||||
|
Loading…
Reference in New Issue
Block a user