Merge "Glance: Include the required classes for image cache"
This commit is contained in:
commit
100e9f3429
|
@ -127,6 +127,10 @@
|
|||
# (optional) Whether to enable db purging
|
||||
# defaults to true
|
||||
#
|
||||
# [*glance_enable_cache*]
|
||||
# (optional) Whether to enable caching
|
||||
# defaults to false
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*glance_rbd_client_name*]
|
||||
|
@ -158,6 +162,7 @@ class tripleo::profile::base::glance::api (
|
|||
$tls_proxy_fqdn = undef,
|
||||
$tls_proxy_port = 9292,
|
||||
$glance_enable_db_purge = true,
|
||||
$glance_enable_cache = false,
|
||||
# DEPRECATED PARAMETERS
|
||||
$glance_rbd_client_name = undef,
|
||||
) {
|
||||
|
@ -258,6 +263,10 @@ class tripleo::profile::base::glance::api (
|
|||
if $glance_enable_db_purge {
|
||||
include glance::cron::db_purge
|
||||
}
|
||||
if $glance_enable_cache {
|
||||
include glance::cache::cleaner
|
||||
include glance::cache::pruner
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -36,6 +36,8 @@ describe 'tripleo::profile::base::glance::api' do
|
|||
is_expected.to_not contain_class('glance::api')
|
||||
is_expected.to_not contain_class('glance::notify::rabbitmq')
|
||||
is_expected.to_not contain_class('glance::cron::db_purge')
|
||||
is_expected.to_not contain_class('glance::cache::cleaner')
|
||||
is_expected.to_not contain_class('glance::cache::pruner')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -64,6 +66,8 @@ describe 'tripleo::profile::base::glance::api' do
|
|||
:notification_transport_url => 'rabbit://glance2:baa@192.168.0.2:5678/?ssl=0',
|
||||
)
|
||||
is_expected.to_not contain_class('glance::cron::db_purge')
|
||||
is_expected.to_not contain_class('glance::cache::cleaner')
|
||||
is_expected.to_not contain_class('glance::cache::pruner')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -81,6 +85,8 @@ describe 'tripleo::profile::base::glance::api' do
|
|||
is_expected.to_not contain_class('glance::api')
|
||||
is_expected.to_not contain_class('glance::notify::rabbitmq')
|
||||
is_expected.to_not contain_class('glance::cron::db_purge')
|
||||
is_expected.to_not contain_class('glance::cache::cleaner')
|
||||
is_expected.to_not contain_class('glance::cache::pruner')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -118,6 +124,8 @@ describe 'tripleo::profile::base::glance::api' do
|
|||
:notification_transport_url => 'rabbit://glance2:baa@192.168.0.2:5678/?ssl=0',
|
||||
)
|
||||
is_expected.to_not contain_class('glance::cron::db_purge')
|
||||
is_expected.to_not contain_class('glance::cache::cleaner')
|
||||
is_expected.to_not contain_class('glance::cache::pruner')
|
||||
end
|
||||
|
||||
context 'with multistore_config' do
|
||||
|
@ -195,6 +203,11 @@ describe 'tripleo::profile::base::glance::api' do
|
|||
it 'should configure db_purge' do
|
||||
is_expected.to contain_class('glance::cron::db_purge')
|
||||
end
|
||||
|
||||
it 'should not configure cache' do
|
||||
is_expected.to_not contain_class('glance::cache::cleaner')
|
||||
is_expected.to_not contain_class('glance::cache::pruner')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with step 5 without db_purge' do
|
||||
|
@ -208,6 +221,19 @@ describe 'tripleo::profile::base::glance::api' do
|
|||
is_expected.to_not contain_class('glance::cron::db_purge')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with step 5 with cache' do
|
||||
let(:params) { {
|
||||
:step => 5,
|
||||
:bootstrap_node => 'node.example.com',
|
||||
:glance_enable_cache => true,
|
||||
} }
|
||||
|
||||
it 'should configure cache' do
|
||||
is_expected.to contain_class('glance::cache::cleaner')
|
||||
is_expected.to contain_class('glance::cache::pruner')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os.each do |os, facts|
|
||||
|
|
Loading…
Reference in New Issue