Remove redundant handling of empty flavor
Setting an empty string('') to [paste_deploy] flavor results in the exactly same behavior as removing the [paste_deploy] flavor option. Thus we don't really need the special treatment for an empty string. Change-Id: Ib50da09ac6fd2499fc922d5d0e1115cd600ecb69
This commit is contained in:
parent
945280277f
commit
2912393664
|
@ -526,18 +526,9 @@ enabled_backends instead.')
|
||||||
$paste_deploy_flavor_real = $paste_deploy_flavor
|
$paste_deploy_flavor_real = $paste_deploy_flavor
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set the flavor, it is allowed to be blank
|
|
||||||
if $paste_deploy_flavor_real != '' {
|
|
||||||
glance_api_config {
|
|
||||||
'paste_deploy/flavor': value => $paste_deploy_flavor_real
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
glance_api_config {
|
|
||||||
'paste_deploy/flavor': ensure => absent
|
|
||||||
}
|
|
||||||
}
|
|
||||||
glance_api_config {
|
glance_api_config {
|
||||||
'paste_deploy/config_file': value => $paste_deploy_config_file
|
'paste_deploy/flavor': value => $paste_deploy_flavor_real;
|
||||||
|
'paste_deploy/config_file': value => $paste_deploy_config_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
# keystone config
|
# keystone config
|
||||||
|
|
|
@ -295,16 +295,6 @@ describe 'glance::api' do
|
||||||
it_raises 'a Puppet::Error', /Invalid service_name/
|
it_raises 'a Puppet::Error', /Invalid service_name/
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'with blank flavor' do
|
|
||||||
let :params do
|
|
||||||
{
|
|
||||||
:paste_deploy_flavor => '',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
it { is_expected.to contain_glance_api_config('paste_deploy/flavor').with_ensure('absent') }
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'with platform default oslo concurrency lock_path' do
|
describe 'with platform default oslo concurrency lock_path' do
|
||||||
it { is_expected.to contain_oslo__concurrency('glance_api_config').with(
|
it { is_expected.to contain_oslo__concurrency('glance_api_config').with(
|
||||||
:lock_path => platform_params[:lock_path]
|
:lock_path => platform_params[:lock_path]
|
||||||
|
|
Loading…
Reference in New Issue