Remove deprecated parameters

These parameters has been deprecated for
more than two years.

Let's remove them and add release notes.

Change-Id: I229f49ac4ce02e0b1ddbd0a2f111739ce3059f37
Closes-Bug: 1767114
This commit is contained in:
Tobias Urdin 2018-04-26 15:12:09 +02:00
parent b0f6bde9a6
commit c3eefcb86e
6 changed files with 27 additions and 95 deletions

View File

@ -404,37 +404,6 @@
# will disable the function in Horizon, direct will allow the user agent to directly
# talk to the glance-api.
#
#
# === DEPRECATED group/name
#
# [*fqdn*]
# (optional) DEPRECATED, use allowed_hosts and server_aliases instead.
# FQDN(s) used to access Horizon. This is used by Django for
# security reasons. Can be set to * in environments where security is
# deemed unimportant. Also used for Server Aliases in web configs.
# Defaults to undef
#
# [*custom_theme_path*]
# (optional) The directory location for the theme (e.g., "static/themes/blue")
# Default to undef
#
# [*tuskar_ui*]
# (optional) Boolean to enable Tuskar-UI related configuration (http://tuskar-ui.readthedocs#
# Defaults to undef
#
# [*tuskar_ui_ironic_discoverd_url*]
# (optional) Tuskar-UI - Ironic Discoverd API endpoint
# Defaults to undef
#
# [*tuskar_ui_undercloud_admin_password*]
# (optional) Tuskar-UI - Undercloud admin password used to authenticate admin user in Tuskar#
# It is required by Heat to perform certain actions.
# Defaults to undef
#
# [*tuskar_ui_deployment_mode*]
# (optional) Tuskar-UI - Deployment mode ('poc' or 'scale')
# Defaults to undef
#
# === Examples
#
# class { 'horizon':
@ -517,13 +486,6 @@ class horizon(
$enable_user_pass = true,
$customization_module = undef,
$horizon_upload_mode = undef,
# DEPRECATED PARAMETERS
$custom_theme_path = undef,
$fqdn = undef,
$tuskar_ui = undef,
$tuskar_ui_ironic_discoverd_url = undef,
$tuskar_ui_undercloud_admin_password = undef,
$tuskar_ui_deployment_mode = undef,
) inherits ::horizon::params {
$hypervisor_defaults = {
@ -531,26 +493,6 @@ class horizon(
'can_set_password' => false,
}
if $fqdn {
warning("Parameter fqdn is deprecated. Please use parameter allowed_hosts for setting ALLOWED_HOSTS in \
settings_local.py and parameter server_aliases for setting ServerAlias directives in vhost.conf.")
$final_allowed_hosts = $fqdn
$final_server_aliases = $fqdn
} else {
$final_allowed_hosts = $allowed_hosts
$final_server_aliases = $server_aliases
}
if $custom_theme_path {
warning('custom_theme_path has been deprecated in mitaka and will be removed in a future release.')
}
if $tuskar_ui or $tuskar_ui_ironic_discoverd_url or $tuskar_ui_undercloud_admin_password or $tuskar_ui_deployment_mode {
warning('tuskar module is no longer maintained, all tuskar parameters will be removed after Newton cycle.')
}
# Default options for the OPENSTACK_CINDER_FEATURES section. These will
# be merged with user-provided options when the local_settings.py.erb
# template is interpolated.
@ -657,7 +599,7 @@ settings_local.py and parameter server_aliases for setting ServerAlias directive
class { '::horizon::wsgi::apache':
bind_address => $bind_address,
servername => $servername,
server_aliases => $final_server_aliases,
server_aliases => $server_aliases,
listen_ssl => $listen_ssl,
ssl_redirect => $ssl_redirect,
horizon_cert => $horizon_cert,

View File

@ -7,10 +7,6 @@
# [*bind_address*]
# (optional) Bind address in Apache for Horizon. (Defaults to '0.0.0.0')
#
# [*fqdn*]
# (Optional) Fqdn
# Defaults to undef.
#
# [*servername*]
# (Optional) Server Name
# Defaults to ::fqdn.
@ -93,7 +89,6 @@
#
class horizon::wsgi::apache (
$bind_address = undef,
$fqdn = undef,
$servername = $::fqdn,
$server_aliases = $::fqdn,
$listen_ssl = false,
@ -116,14 +111,6 @@ class horizon::wsgi::apache (
) inherits horizon::params {
include ::apache
if $fqdn {
warning('Parameter fqdn is deprecated. Please use parameter server_aliases for setting ServerAlias directives in vhost.conf.')
$final_server_aliases = $fqdn
} else {
$final_server_aliases = $server_aliases
}
include ::apache::mod::wsgi
# We already use apache::vhost to generate our own
@ -220,7 +207,7 @@ class horizon::wsgi::apache (
$default_vhost_conf_no_ip = {
servername => $servername,
serveraliases => os_any2array($final_server_aliases),
serveraliases => os_any2array($server_aliases),
docroot => '/var/www/',
access_log_file => 'horizon_access.log',
error_log_file => 'horizon_error.log',

View File

@ -0,0 +1,14 @@
---
upgrade:
- |
The deprecated horizon::fqdn parameter is now removed.
Please use the allowed_hosts and server_aliases parameters instead.
- |
The deprecated horizon::wsgi::apache::fqdn parameter is now removed.
Please use the server_aliases parameter instead.
- |
The deprecated horizon::custom_theme_path parameter is now removed.
Please use the available_themes parameter instead.
- |
The deprecated tuskar_ui, tuskar_ui_ironic_discoverd_url, tuskar_ui_undercloud_admin_password
and tuskar_ui_deployment_mode is now removed. Please remove the usage of these parameters.

View File

@ -3,8 +3,7 @@ require 'spec_helper'
describe 'horizon' do
let :params do
{ 'secret_key' => 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0',
'fqdn' => '*' }
{ 'secret_key' => 'elj1IWiLoWHgcyYxFVLj7cM5rGOOxWl0' }
end
let :pre_condition do
@ -57,7 +56,7 @@ describe 'horizon' do
"LOGIN_URL = '#{platforms_params[:root_url]}/auth/login/'",
"LOGOUT_URL = '#{platforms_params[:root_url]}/auth/logout/'",
"LOGIN_REDIRECT_URL = '#{platforms_params[:root_url]}/'",
"ALLOWED_HOSTS = ['*', ]",
"ALLOWED_HOSTS = ['some.host.tld', ]",
" 'identity': 3,",
'HORIZON_CONFIG["password_autocomplete"] = "off"',
'HORIZON_CONFIG["images_panel"] = "legacy"',
@ -140,7 +139,7 @@ describe 'horizon' do
it 'generates local_settings.py' do
verify_concat_fragment_contents(catalogue, 'local_settings.py', [
'DEBUG = True',
"ALLOWED_HOSTS = ['*', ]",
"ALLOWED_HOSTS = ['some.host.tld', ]",
"SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')",
'CSRF_COOKIE_SECURE = True',
'SESSION_COOKIE_SECURE = True',

View File

@ -3,7 +3,7 @@ require 'spec_helper'
describe 'horizon::wsgi::apache' do
let :params do
{ :fqdn => '*',
{
:servername => 'some.host.tld',
:wsgi_processes => '3',
:wsgi_threads => '10',
@ -35,7 +35,7 @@ describe 'horizon::wsgi::apache' do
'access_log_file' => 'horizon_access.log',
'error_log_file' => 'horizon_error.log',
'priority' => '15',
'serveraliases' => ['*'],
'serveraliases' => ['some.host.tld'],
'docroot' => '/var/www/',
'ssl' => 'false',
'port' => '80',
@ -72,7 +72,7 @@ describe 'horizon::wsgi::apache' do
'access_log_file' => 'horizon_access.log',
'error_log_file' => 'horizon_error.log',
'priority' => params[:priority],
'serveraliases' => ['*'],
'serveraliases' => ['some.host.tld'],
'docroot' => '/var/www/',
'ssl' => 'false',
'port' => '80',
@ -131,7 +131,7 @@ describe 'horizon::wsgi::apache' do
'access_log_file' => 'horizon_ssl_access.log',
'error_log_file' => 'horizon_ssl_error.log',
'priority' => '15',
'serveraliases' => ['*'],
'serveraliases' => ['some.host.tld'],
'docroot' => '/var/www/',
'ssl' => 'true',
'port' => '443',
@ -152,7 +152,7 @@ describe 'horizon::wsgi::apache' do
'access_log_file' => 'horizon_access.log',
'error_log_file' => 'horizon_error.log',
'priority' => '15',
'serveraliases' => ['*'],
'serveraliases' => ['some.host.tld'],
'docroot' => '/var/www/',
'ssl' => 'false',
'port' => '80',

View File

@ -31,10 +31,10 @@ LOGIN_REDIRECT_URL = '<%= @root_url %>/'
# For more information see:
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
#ALLOWED_HOSTS = ['horizon.example.com', ]
<% if @final_allowed_hosts.kind_of?(Array) %>
ALLOWED_HOSTS = ['<%= @final_allowed_hosts.join("', '") %>', ]
<% if @allowed_hosts.kind_of?(Array) %>
ALLOWED_HOSTS = ['<%= @allowed_hosts.join("', '") %>', ]
<% else %>
ALLOWED_HOSTS = ['<%= @final_allowed_hosts %>', ]
ALLOWED_HOSTS = ['<%= @allowed_hosts %>', ]
<% end %>
# Set SSL proxy settings:
# Pass this header from the proxy after terminating the SSL,
@ -585,16 +585,6 @@ EXTERNAL_MONITORING = <%= @horizon_app_links %>
# 'reverse': False,
#}
# CUSTOM_THEME_PATH allows to set to the directory location for the
# theme (e.g., "static/themes/blue"). The path can either be
# relative to the openstack_dashboard directory or an absolute path
# to an accessible location on the file system.
# If not specified, the default CUSTOM_THEME_PATH is
# static/themes/default.
<% if @custom_theme_path %>
CUSTOM_THEME_PATH = '<%= @custom_theme_path %>'
<% end %>
<% if @available_themes.kind_of?(Array) %>
AVAILABLE_THEMES = [
<% @available_themes.each do |theme| %>