Add ability to manage ceph package resource
Change-Id: Id941318d15db17428755d0b8f91065a6a9c63587
This commit is contained in:
parent
3e95068e68
commit
19f2ee80b9
|
@ -21,6 +21,11 @@
|
|||
# Optional. Enables direct COW from glare to rbd
|
||||
# DEPRECATED, use show_image_direct_url in glare::api
|
||||
#
|
||||
# [*package_manage*]
|
||||
# (optional) Whether manage ceph package
|
||||
# state or not.
|
||||
# Defaults to true.
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (optional) Desired ensure state of packages.
|
||||
# accepts latest or specific versions.
|
||||
|
@ -41,6 +46,7 @@ class glare::backend::rbd(
|
|||
$rbd_store_ceph_conf = $::os_service_default,
|
||||
$rbd_store_pool = $::os_service_default,
|
||||
$rbd_store_chunk_size = $::os_service_default,
|
||||
$package_manage = true,
|
||||
$package_ensure = 'present',
|
||||
$rados_connect_timeout = $::os_service_default,
|
||||
$multi_store = false,
|
||||
|
@ -62,12 +68,14 @@ class glare::backend::rbd(
|
|||
glare_config { 'glance_store/default_store': value => 'rbd'; }
|
||||
}
|
||||
|
||||
ensure_packages('python-ceph',
|
||||
{
|
||||
ensure => $package_ensure,
|
||||
name => $::glare::params::pyceph_package_name,
|
||||
tag => 'glare-support-package',
|
||||
}
|
||||
)
|
||||
if $package_manage {
|
||||
ensure_packages('python-ceph',
|
||||
{
|
||||
ensure => $package_ensure,
|
||||
name => $::glare::params::pyceph_package_name,
|
||||
tag => 'glare-support-package',
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -41,6 +41,19 @@ describe 'glare::backend::rbd' do
|
|||
}
|
||||
end
|
||||
|
||||
describe 'with not managed ceph package' do
|
||||
let :params do
|
||||
{
|
||||
:package_manage => false
|
||||
}
|
||||
end
|
||||
|
||||
it 'does not configure ceph package' do
|
||||
is_expected.not_to contain_package('python-ceph').with(
|
||||
:name => 'python-ceph')
|
||||
end
|
||||
end
|
||||
|
||||
describe 'package on RedHat platform el6' do
|
||||
let :facts do
|
||||
OSDefaults.get_facts({
|
||||
|
|
Loading…
Reference in New Issue