Remove logic to handle quoted horizon_upload_mode

This is follow-up of 625275af36 and
removes the temporal logic to keep compatibility, because we have kept
the warning message for several cycles.

Related-Bug: #1946277
Change-Id: I1b11305df67dbe3127642a96bda429faae0059d5
This commit is contained in:
Takashi Kajinami 2022-08-17 09:00:54 +09:00
parent 14b45e9987
commit 6bf7abada9
4 changed files with 8 additions and 26 deletions

View File

@ -656,17 +656,6 @@ class horizon(
include horizon::deps
# TODO(tkajinam): Remove this logic after Yoga cycle.
if $horizon_upload_mode != undef {
$horizon_upload_mode_real = regsubst($horizon_upload_mode, "('|\")", '', 'G')
if $horizon_upload_mode != $horizon_upload_mode_real {
warning('The horizon_upload_mode parameter is now quoted automatically, \
and usage of a quoted value is deprecated.')
}
} else {
$horizon_upload_mode_real = undef
}
if $cache_server_url and $cache_server_ip {
fail('Only one of cache_server_url or cache_server_ip can be set.')
}

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
The ``horizon::horizon_upload_mode`` parameter is now always surrounded by
double quotes(``""``) when being rendered into the local_settings file.
Quotes should be removed from the parameter.

View File

@ -733,19 +733,6 @@ describe 'horizon' do
end
end
context 'with upload mode with quotes' do
before do
params.merge!({
:horizon_upload_mode => '"direct"',
})
end
it 'sets HORIZON_IMAGES_UPLOAD_MODE in local_settings.py' do
verify_concat_fragment_contents(catalogue, 'local_settings.py', [
'HORIZON_IMAGES_UPLOAD_MODE = "direct"',
])
end
end
context 'with keystone_domain_choices' do
before do
params.merge!({

View File

@ -1037,8 +1037,8 @@ DISALLOW_IFRAME_EMBED = <%= @disallow_iframe_embed.to_s.capitalize %>
# image form. If set to 'off', there will be no file form field on the create
# image form. See documentation for deployment considerations.
#HORIZON_IMAGES_UPLOAD_MODE = 'legacy'
<% if @horizon_upload_mode_real -%>
HORIZON_IMAGES_UPLOAD_MODE = "<%= @horizon_upload_mode_real %>"
<% if @horizon_upload_mode -%>
HORIZON_IMAGES_UPLOAD_MODE = "<%= @horizon_upload_mode %>"
<%- end -%>
# A default instance boot source. Allowed values are: "image", "snapshot",