Add support for [DEFAULT] host option
Change-Id: If07119d76f6e2c5efa2e57dcab1dc35cc9e88f7e Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -8,6 +8,10 @@
|
||||
# (Optional) Ensure state for package
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# [*host*]
|
||||
# (optional) Name of this node.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
# [*notification_transport_url*]
|
||||
# (Optional) A URL representing the messaging driver to use for notifications
|
||||
# and its full configuration. Transport URLs take the form:
|
||||
@@ -176,6 +180,7 @@
|
||||
#
|
||||
class magnum (
|
||||
$package_ensure = 'present',
|
||||
$host = $facts['os_service_default'],
|
||||
$notification_transport_url = $facts['os_service_default'],
|
||||
$notification_driver = $facts['os_service_default'],
|
||||
$notification_topics = $facts['os_service_default'],
|
||||
@@ -225,6 +230,10 @@ class magnum (
|
||||
purge => $purge_config,
|
||||
}
|
||||
|
||||
magnum_config {
|
||||
'DEFAULT/host': value => $host;
|
||||
}
|
||||
|
||||
oslo::messaging::rabbit { 'magnum_config':
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
|
||||
|
4
releasenotes/notes/host-1c9b995fa9843ff5.yaml
Normal file
4
releasenotes/notes/host-1c9b995fa9843ff5.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``magnum::host`` parameter has been added.
|
@@ -30,6 +30,10 @@ describe 'magnum' do
|
||||
})
|
||||
end
|
||||
|
||||
it 'configures host' do
|
||||
is_expected.to contain_magnum_config('DEFAULT/host').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_oslo__messaging__rabbit('magnum_config').with(
|
||||
:rabbit_ha_queues => '<SERVICE DEFAULT>',
|
||||
@@ -73,6 +77,7 @@ describe 'magnum' do
|
||||
context 'with overridden parameters' do
|
||||
let :params do
|
||||
{ :package_ensure => 'latest',
|
||||
:host => 'localhost',
|
||||
:notification_transport_url => 'rabbit://user:pass@host:1234/virt',
|
||||
:notification_topics => 'openstack',
|
||||
:notification_driver => 'messagingv1',
|
||||
@@ -108,6 +113,10 @@ describe 'magnum' do
|
||||
)
|
||||
end
|
||||
|
||||
it 'configures host' do
|
||||
is_expected.to contain_magnum_config('DEFAULT/host').with_value('localhost')
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_oslo__messaging__default('magnum_config').with(
|
||||
:transport_url => 'rabbit://user:pass@host:1234/virt',
|
||||
|
Reference in New Issue
Block a user