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:
Takashi Kajinami 2023-06-19 16:38:57 +09:00
parent 945280277f
commit 2912393664
2 changed files with 2 additions and 21 deletions

View File

@ -526,18 +526,9 @@ enabled_backends instead.')
$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 {
'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

View File

@ -295,16 +295,6 @@ describe 'glance::api' do
it_raises 'a Puppet::Error', /Invalid service_name/
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
it { is_expected.to contain_oslo__concurrency('glance_api_config').with(
:lock_path => platform_params[:lock_path]