Merge "Allow customizing state of the python-ceph package"
This commit is contained in:
commit
6e91a0fc00
@ -44,6 +44,10 @@
|
||||
# (optional) Ensure state of the rados python package.
|
||||
# Defaults to true.
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (optional) ensure state for package.
|
||||
# Defaults to 'present'
|
||||
#
|
||||
class gnocchi::storage::ceph(
|
||||
$ceph_username,
|
||||
$ceph_keyring = $::os_service_default,
|
||||
@ -51,6 +55,7 @@ class gnocchi::storage::ceph(
|
||||
$ceph_pool = 'gnocchi',
|
||||
$ceph_conffile = '/etc/ceph/ceph.conf',
|
||||
$manage_rados = true,
|
||||
$package_ensure = 'present',
|
||||
) inherits gnocchi::params {
|
||||
|
||||
include gnocchi::deps
|
||||
@ -70,7 +75,7 @@ class gnocchi::storage::ceph(
|
||||
|
||||
if $manage_rados {
|
||||
ensure_packages('python-rados', {
|
||||
'ensure' => 'present',
|
||||
'ensure' => $package_ensure,
|
||||
'name' => $::gnocchi::params::rados_package_name,
|
||||
'tag' => ['openstack','gnocchi-package'],
|
||||
})
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``gnoccho::storage::ceph::package_ensure`` parameter has been
|
||||
added.
|
@ -61,6 +61,18 @@ describe 'gnocchi::storage::ceph' do
|
||||
|
||||
it { is_expected.not_to contain_package('python-rados') }
|
||||
end
|
||||
|
||||
context 'with package_ensure' do
|
||||
before do
|
||||
params.merge!( :package_ensure => 'latest' )
|
||||
end
|
||||
|
||||
it { is_expected.to contain_package('python-rados').with(
|
||||
:ensure => 'latest',
|
||||
:name => 'python3-rados',
|
||||
:tag => ['openstack', 'gnocchi-package'],
|
||||
)}
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
Loading…
Reference in New Issue
Block a user