Add $package_ensure to glance::backend::rbd
Previously for the python-ceph package ensure was hard coded to 'present', but in some circumstances we want to set the ensure value same as for the glance package itself. This adds that in. Change-Id: Ib5fc0b3d916eef93c810b0ee3fcecf0d9b80218e
This commit is contained in:
parent
a432119ff6
commit
b909152922
@ -12,6 +12,12 @@
|
||||
#
|
||||
# $show_image_direct_url - Optional. Enables direct COW from glance to rbd
|
||||
# DEPRECATED, use show_image_direct_url in glance::api
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (optional) Desired ensure state of packages.
|
||||
# accepts latest or specific versions.
|
||||
# Defaults to present.
|
||||
#
|
||||
|
||||
class glance::backend::rbd(
|
||||
$rbd_store_user = undef,
|
||||
@ -19,6 +25,7 @@ class glance::backend::rbd(
|
||||
$rbd_store_pool = 'images',
|
||||
$rbd_store_chunk_size = '8',
|
||||
$show_image_direct_url = undef,
|
||||
$package_ensure = 'present',
|
||||
) {
|
||||
include glance::params
|
||||
|
||||
@ -35,7 +42,7 @@ class glance::backend::rbd(
|
||||
}
|
||||
|
||||
package { 'python-ceph':
|
||||
ensure => 'present',
|
||||
ensure => $package_ensure,
|
||||
name => $::glance::params::pyceph_package_name,
|
||||
}
|
||||
|
||||
|
@ -31,9 +31,15 @@ describe 'glance::backend::rbd' do
|
||||
{
|
||||
:rbd_store_user => 'user',
|
||||
:rbd_store_chunk_size => '2',
|
||||
:package_ensure => 'latest',
|
||||
}
|
||||
end
|
||||
it { should contain_glance_api_config('DEFAULT/rbd_store_user').with_value('user') }
|
||||
it { should contain_glance_api_config('DEFAULT/rbd_store_chunk_size').with_value('2') }
|
||||
it { should contain_package('python-ceph').with(
|
||||
:name => 'python-ceph',
|
||||
:ensure => 'latest'
|
||||
)
|
||||
}
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user