coordination: Expose parameters for package management
Change-Id: Ifd26c47e212bef1788cf60c198c3e779e3beff27 Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
@@ -8,13 +8,25 @@
|
||||
# (Optional) Coordination backend URL.
|
||||
# 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 ceilometer::coordination (
|
||||
$backend_url = $facts['os_service_default'],
|
||||
$backend_url = $facts['os_service_default'],
|
||||
Boolean $manage_backend_package = true,
|
||||
Stdlib::Ensure::Package $package_ensure = present,
|
||||
) {
|
||||
include ceilometer::deps
|
||||
|
||||
oslo::coordination { 'ceilometer_config':
|
||||
backend_url => $backend_url,
|
||||
backend_url => $backend_url,
|
||||
manage_backend_package => $manage_backend_package,
|
||||
package_ensure => $package_ensure,
|
||||
}
|
||||
|
||||
# all coordination settings should be applied and all packages should be
|
||||
|
@@ -0,0 +1,8 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The following parameters have been added to
|
||||
the ``ceilometer::coordination`` class.
|
||||
|
||||
- ``manage_backend_package``
|
||||
- ``package_ensure``
|
@@ -5,7 +5,9 @@ describe 'ceilometer::coordination' do
|
||||
context 'with default parameters' do
|
||||
it {
|
||||
is_expected.to contain_oslo__coordination('ceilometer_config').with(
|
||||
:backend_url => '<SERVICE DEFAULT>'
|
||||
:backend_url => '<SERVICE DEFAULT>',
|
||||
:manage_backend_package => true,
|
||||
:package_ensure => 'present',
|
||||
)
|
||||
}
|
||||
end
|
||||
@@ -13,13 +15,17 @@ describe 'ceilometer::coordination' do
|
||||
context 'with specified parameters' do
|
||||
let :params do
|
||||
{
|
||||
: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',
|
||||
}
|
||||
end
|
||||
|
||||
it {
|
||||
is_expected.to contain_oslo__coordination('ceilometer_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',
|
||||
)
|
||||
}
|
||||
end
|
||||
|
Reference in New Issue
Block a user