coordination: Expose parameters for package management
Change-Id: I2932e6166f0d2c26f343d81daaf607c69c977723 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -18,15 +18,27 @@
|
|||||||
# has changed.
|
# has changed.
|
||||||
# Defaults to $facts['os_service_default']
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
|
# [*manage_backend_package*]
|
||||||
|
# (Optional) Whether to install the backend package.
|
||||||
|
# Defaults to true.
|
||||||
|
#
|
||||||
|
# [*package_ensure*]
|
||||||
|
# (Optional) ensure state for package.
|
||||||
|
# Defaults to 'present'
|
||||||
|
#
|
||||||
class designate::coordination (
|
class designate::coordination (
|
||||||
$backend_url = $facts['os_service_default'],
|
$backend_url = $facts['os_service_default'],
|
||||||
$heartbeat_interval = $facts['os_service_default'],
|
$heartbeat_interval = $facts['os_service_default'],
|
||||||
$run_watchers_interval = $facts['os_service_default'],
|
$run_watchers_interval = $facts['os_service_default'],
|
||||||
|
Boolean $manage_backend_package = true,
|
||||||
|
Stdlib::Ensure::Package $package_ensure = present,
|
||||||
) {
|
) {
|
||||||
include designate::deps
|
include designate::deps
|
||||||
|
|
||||||
oslo::coordination { 'designate_config':
|
oslo::coordination { 'designate_config':
|
||||||
backend_url => $backend_url,
|
backend_url => $backend_url,
|
||||||
|
manage_backend_package => $manage_backend_package,
|
||||||
|
package_ensure => $package_ensure,
|
||||||
}
|
}
|
||||||
|
|
||||||
designate_config {
|
designate_config {
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
The following parameters have been added to the ``designate::coordination``
|
||||||
|
class.
|
||||||
|
|
||||||
|
- ``manage_backend_package``
|
||||||
|
- ``package_ensure``
|
||||||
@@ -5,7 +5,9 @@ describe 'designate::coordination' do
|
|||||||
context 'with default parameters' do
|
context 'with default parameters' do
|
||||||
it {
|
it {
|
||||||
is_expected.to contain_oslo__coordination('designate_config').with(
|
is_expected.to contain_oslo__coordination('designate_config').with(
|
||||||
:backend_url => '<SERVICE DEFAULT>'
|
:backend_url => '<SERVICE DEFAULT>',
|
||||||
|
:manage_backend_package => true,
|
||||||
|
:package_ensure => 'present',
|
||||||
)
|
)
|
||||||
is_expected.to contain_designate_config('coordination/heartbeat_interval').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_designate_config('coordination/heartbeat_interval').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_designate_config('coordination/run_watchers_interval').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_designate_config('coordination/run_watchers_interval').with_value('<SERVICE DEFAULT>')
|
||||||
@@ -18,12 +20,16 @@ describe 'designate::coordination' do
|
|||||||
:backend_url => 'etcd3+http://127.0.0.1:2379',
|
:backend_url => 'etcd3+http://127.0.0.1:2379',
|
||||||
:heartbeat_interval => 5.0,
|
:heartbeat_interval => 5.0,
|
||||||
:run_watchers_interval => 10.0,
|
:run_watchers_interval => 10.0,
|
||||||
|
:manage_backend_package => false,
|
||||||
|
:package_ensure => 'latest',
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
it {
|
it {
|
||||||
is_expected.to contain_oslo__coordination('designate_config').with(
|
is_expected.to contain_oslo__coordination('designate_config').with(
|
||||||
:backend_url => 'etcd3+http://127.0.0.1:2379'
|
:backend_url => 'etcd3+http://127.0.0.1:2379',
|
||||||
|
:manage_backend_package => false,
|
||||||
|
:package_ensure => 'latest',
|
||||||
)
|
)
|
||||||
is_expected.to contain_designate_config('coordination/heartbeat_interval').with_value(5.0)
|
is_expected.to contain_designate_config('coordination/heartbeat_interval').with_value(5.0)
|
||||||
is_expected.to contain_designate_config('coordination/run_watchers_interval').with_value(10.0)
|
is_expected.to contain_designate_config('coordination/run_watchers_interval').with_value(10.0)
|
||||||
|
|||||||
Reference in New Issue
Block a user