Merge "Add $package_ensure to glance::backend::rbd"

This commit is contained in:
Jenkins 2014-09-04 15:47:46 +00:00 committed by Gerrit Code Review
commit 78042d76c0
2 changed files with 14 additions and 1 deletions

View File

@ -12,6 +12,12 @@
# #
# $show_image_direct_url - Optional. Enables direct COW from glance to rbd # $show_image_direct_url - Optional. Enables direct COW from glance to rbd
# DEPRECATED, use show_image_direct_url in glance::api # 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( class glance::backend::rbd(
$rbd_store_user = undef, $rbd_store_user = undef,
@ -19,6 +25,7 @@ class glance::backend::rbd(
$rbd_store_pool = 'images', $rbd_store_pool = 'images',
$rbd_store_chunk_size = '8', $rbd_store_chunk_size = '8',
$show_image_direct_url = undef, $show_image_direct_url = undef,
$package_ensure = 'present',
) { ) {
include glance::params include glance::params
@ -35,7 +42,7 @@ class glance::backend::rbd(
} }
package { 'python-ceph': package { 'python-ceph':
ensure => 'present', ensure => $package_ensure,
name => $::glance::params::pyceph_package_name, name => $::glance::params::pyceph_package_name,
} }

View File

@ -31,9 +31,15 @@ describe 'glance::backend::rbd' do
{ {
:rbd_store_user => 'user', :rbd_store_user => 'user',
:rbd_store_chunk_size => '2', :rbd_store_chunk_size => '2',
:package_ensure => 'latest',
} }
end end
it { should contain_glance_api_config('DEFAULT/rbd_store_user').with_value('user') } 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_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
end end