Deprecate ineffective images_panel

The images_panel key in HORIZON_CONFIG setting dict was once added
during Newton cycle but was removed when ANGULAR_FEATURES option was
added in the same cycle[1].

Because the parameter has have no effect for long, this deprecates
the parameter so that we can remove it in a future release instead of
fixing it.

[1] https://review.opendev.org/c/openstack/horizon/+/353377

Change-Id: I376af3b7c4525036bf1bb449cb71490495395f2c
This commit is contained in:
Takashi Kajinami 2023-02-16 12:07:24 +09:00
parent 77dcef9b78
commit 4f3e975a9e
4 changed files with 17 additions and 14 deletions

View File

@ -406,11 +406,6 @@
# Valid values are 'on' and 'off'
# Defaults to 'off'
#
# [*images_panel*]
# (optional) Enabled panel for images.
# Valid values are 'legacy' and 'angular'
# Defaults to 'legacy'
#
# [*create_image_defaults*]
# (optional) A dictionary of default settings for create image modal.
# Defaults to undef - will not add entry to local settings.
@ -545,6 +540,12 @@
# (optional) Enable the use of the system scope token on per-service basis.
# Defaults to undef
#
# DEPRECATED PARAMETERS
#
# [*images_panel*]
# (optional) Enabled panel for images.
# Defaults to undef
#
# === Examples
#
# class { 'horizon':
@ -634,7 +635,6 @@ class horizon(
$available_themes = false,
$default_theme = false,
$password_autocomplete = 'off',
$images_panel = 'legacy',
$create_image_defaults = undef,
$password_retrieve = false,
$disable_password_reveal = false,
@ -657,6 +657,8 @@ class horizon(
$horizon_upload_mode = undef,
$default_boot_source = undef,
$system_scope_services = undef,
# DEPRECATED PARAMETERS
$images_panel = undef,
) inherits horizon::params {
include horizon::deps
@ -680,6 +682,10 @@ class horizon(
validate_legacy(Boolean, 'validate_bool', $websso_choices_hide_keystone)
validate_legacy(Boolean, 'validate_bool', $websso_default_redirect)
if $images_panel {
warning('The images_panel parameter has been deprecated and has no effect.')
}
if $cache_server_url and $cache_server_ip {
fail('Only one of cache_server_url or cache_server_ip can be set.')
}
@ -762,7 +768,6 @@ class horizon(
validate_legacy(Hash, 'validate_hash', $api_versions)
validate_legacy(Enum['on', 'off'], 'validate_re', $password_autocomplete, [['^on$', '^off$']])
validate_legacy(Enum['legacy', 'angular'], 'validate_re', $images_panel, [['^legacy$', '^angular$']])
validate_legacy(Stdlib::Absolutepath, 'validate_absolute_path', $root_path)
if $manage_memcache_package {

View File

@ -0,0 +1,5 @@
---
deprecations:
- |
The ``horizon::images_panel`` parameter has been deprecated and has no
effect.

View File

@ -67,7 +67,6 @@ describe 'horizon' do
"LOGIN_REDIRECT_URL = '#{platforms_params[:root_url]}/'",
"ALLOWED_HOSTS = ['some.host.tld', ]",
'HORIZON_CONFIG["password_autocomplete"] = "off"',
'HORIZON_CONFIG["images_panel"] = "legacy"',
"SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0'",
'OPENSTACK_KEYSTONE_URL = "http://127.0.0.1:5000"',
'OPENSTACK_KEYSTONE_DEFAULT_ROLE = "member"',
@ -139,7 +138,6 @@ describe 'horizon' do
],
:default_theme => 'default',
:password_autocomplete => 'on',
:images_panel => 'angular',
:create_image_defaults => {'image_visibility' => 'private'},
:password_retrieve => true,
:enable_secure_proxy_ssl_header => true,
@ -161,7 +159,6 @@ describe 'horizon' do
"OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True",
"OPENSTACK_KEYSTONE_DEFAULT_DOMAIN = 'domain.tld'",
'HORIZON_CONFIG["password_autocomplete"] = "on"',
'HORIZON_CONFIG["images_panel"] = "angular"',
"SECRET_KEY = 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0'",
" 'OPTIONS': {",
" 'DEAD_RETRY': 1,",

View File

@ -190,10 +190,6 @@ HORIZON_CONFIG["disable_password_reveal"] = True
HORIZON_CONFIG["enforce_password_check"] = True
<% end -%>
# Configure enabled image panel. It can be legacy or angular.
#HORIZON_CONFIG["images_panel"] = "legacy"
HORIZON_CONFIG["images_panel"] = "<%= @images_panel %>"
LOCAL_PATH = os.path.dirname(os.path.abspath(__file__))
# Set custom secret key: