Merge "Fix missing HORIZON_IMAGES_UPLOAD_MODE"
This commit is contained in:
commit
0a69bcd759
|
@ -632,6 +632,17 @@ class horizon(
|
|||
include horizon::dashboards::heat
|
||||
}
|
||||
|
||||
# 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.')
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Fix HORIZON_IMAGES_UPLOAD_MODE in template file because the value must be
|
||||
encapsulated with quotes or it will be treated as an expression by horizon.
|
|
@ -694,7 +694,20 @@ describe 'horizon' do
|
|||
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',
|
||||
'HORIZON_IMAGES_UPLOAD_MODE = "direct"',
|
||||
])
|
||||
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
|
||||
|
|
|
@ -1038,6 +1038,6 @@ REST_API_REQUIRED_SETTINGS = ['OPENSTACK_HYPERVISOR_FEATURES',
|
|||
#DISALLOW_IFRAME_EMBED = True
|
||||
DISALLOW_IFRAME_EMBED = <%= @disallow_iframe_embed.to_s.capitalize %>
|
||||
|
||||
<% if @horizon_upload_mode %>
|
||||
HORIZON_IMAGES_UPLOAD_MODE = <%= @horizon_upload_mode %>
|
||||
<% if @horizon_upload_mode_real %>
|
||||
HORIZON_IMAGES_UPLOAD_MODE = "<%= @horizon_upload_mode_real %>"
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue