Remove redundant usage of undef
The parameters added by 1c7c146c91
use
undef as the default values and automatically replaces undef by the
actual value expected by distro, but this is redundant behavior.
This patch makes actual values used as the defaults to make logic to
pick up the value more simple.
Note that previous behavior with undef is still kept to keep backward
compatibility during this cycle, but it will be removed in a future
release.
Change-Id: I0db901e53ec53d8a5098e7f7aeb8cda3c52c79a0
This commit is contained in:
parent
61df5de0b8
commit
fa753eafe8
@ -135,20 +135,29 @@ class aodh::wsgi::apache (
|
||||
$access_log_format = false,
|
||||
$error_log_file = undef,
|
||||
$custom_wsgi_process_options = {},
|
||||
$wsgi_script_dir = undef,
|
||||
$wsgi_script_source = undef,
|
||||
$wsgi_script_dir = $::aodh::params::aodh_wsgi_script_path,
|
||||
$wsgi_script_source = $::aodh::params::aodh_wsgi_script_source,
|
||||
$vhost_custom_fragment = undef,
|
||||
) {
|
||||
) inherits aodh::params {
|
||||
|
||||
include aodh::deps
|
||||
include aodh::params
|
||||
include apache
|
||||
include apache::mod::wsgi
|
||||
if $ssl {
|
||||
include apache::mod::ssl
|
||||
}
|
||||
|
||||
# TODO(tkajinam): Remove the following compat codes in W-cycle.
|
||||
if $wsgi_script_dir == undef {
|
||||
warning('Usage of undef for the wsgi_script_dir paramaeter has been deprecated. \
|
||||
Use $::aodh::params::aodh_wsgi_script_path instead')
|
||||
}
|
||||
$wsgi_script_dir_real = pick($wsgi_script_dir, $::aodh::params::aodh_wsgi_script_path)
|
||||
|
||||
if $wsgi_script_source == undef {
|
||||
warning('Usage of undef for the wsgi_script_source paramaeter has been deprecated. \
|
||||
Use $::aodh::params::aodh_wsgi_script_source instead')
|
||||
}
|
||||
$wsgi_script_source_real = pick($wsgi_script_source, $::aodh::params::aodh_wsgi_script_source)
|
||||
|
||||
# NOTE(aschultz): needed because the packaging may introduce some apache
|
||||
|
@ -0,0 +1,10 @@
|
||||
---
|
||||
deprecations:
|
||||
- |
|
||||
Usage of ``undef`` for the following parameters has been deprecated and it
|
||||
won't be replaced by the default value automatically in a future release.
|
||||
Set the exact value or use the parameters defined in the ``aodh::param``
|
||||
class.
|
||||
|
||||
- ``wsgi::apache::aodh_wsgi_script_path``
|
||||
- ``wsgi::apache::aodh_wsgi_script_source``
|
Loading…
Reference in New Issue
Block a user