Deprecate verbose option
Option "verbose" from group "DEFAULT" is deprecated for removal. The parameter has no effect. If this option is not set explicitly, there is no such warning. Change-Id: I03b278415861f58ffee810244b6eeabfa2e2127c
This commit is contained in:
@@ -170,10 +170,6 @@
|
||||
# any directory.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*verbose*]
|
||||
# (optional) Set log output to verbose output.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*debug*]
|
||||
# (optional) Set log output to debug output.
|
||||
# Defaults to undef
|
||||
@@ -237,6 +233,10 @@
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*verbose*]
|
||||
# (optional) Deprecated. Set log output to verbose output.
|
||||
# Defaults to undef
|
||||
#
|
||||
class aodh (
|
||||
$ensure_package = 'present',
|
||||
$alarm_history_time_to_live = $::os_service_default,
|
||||
@@ -274,7 +274,6 @@ class aodh (
|
||||
$amqp_sasl_config_name = $::os_service_default,
|
||||
$amqp_username = $::os_service_default,
|
||||
$amqp_password = $::os_service_default,
|
||||
$verbose = undef,
|
||||
$debug = undef,
|
||||
$use_syslog = undef,
|
||||
$use_stderr = undef,
|
||||
@@ -292,6 +291,7 @@ class aodh (
|
||||
$database_max_overflow = undef,
|
||||
$gnocchi_url = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$verbose = undef,
|
||||
) inherits aodh::params {
|
||||
|
||||
include ::aodh::db
|
||||
@@ -303,6 +303,10 @@ class aodh (
|
||||
tag => ['openstack', 'aodh-package'],
|
||||
}
|
||||
|
||||
if $verbose {
|
||||
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
|
||||
}
|
||||
|
||||
if $rpc_backend == 'rabbit' {
|
||||
oslo::messaging::rabbit { 'aodh_config':
|
||||
rabbit_userid => $rabbit_userid,
|
||||
|
@@ -4,10 +4,6 @@
|
||||
#
|
||||
# == parameters
|
||||
#
|
||||
# [*verbose*]
|
||||
# (Optional) Should the daemons log verbose messages
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*debug*]
|
||||
# (Optional) Should the daemons log debug messages
|
||||
# Defaults to $::os_service_default
|
||||
@@ -84,18 +80,23 @@
|
||||
# it like this (string value).
|
||||
# Defaults to $::os_service_default
|
||||
# Example: instance_uuid_format='[instance: %(uuid)s] '
|
||||
|
||||
#
|
||||
# [*log_date_format*]
|
||||
# (optional) Format string for %%(asctime)s in log records.
|
||||
# Defaults to $::os_service_default
|
||||
# Example: 'Y-%m-%d %H:%M:%S'
|
||||
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*verbose*]
|
||||
# (Optional) Deprecated. Should the daemons log verbose messages
|
||||
# Defaults to undef
|
||||
#
|
||||
class aodh::logging(
|
||||
$use_syslog = $::os_service_default,
|
||||
$use_stderr = $::os_service_default,
|
||||
$log_facility = $::os_service_default,
|
||||
$log_dir = '/var/log/aodh',
|
||||
$verbose = $::os_service_default,
|
||||
$debug = $::os_service_default,
|
||||
$logging_context_format_string = $::os_service_default,
|
||||
$logging_default_format_string = $::os_service_default,
|
||||
@@ -108,20 +109,24 @@ class aodh::logging(
|
||||
$instance_format = $::os_service_default,
|
||||
$instance_uuid_format = $::os_service_default,
|
||||
$log_date_format = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$verbose = undef,
|
||||
) {
|
||||
|
||||
if $verbose {
|
||||
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
|
||||
}
|
||||
|
||||
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
|
||||
# to use aodh::<myparam> first then aodh::logging::<myparam>.
|
||||
$use_syslog_real = pick($::aodh::use_syslog,$use_syslog)
|
||||
$use_stderr_real = pick($::aodh::use_stderr,$use_stderr)
|
||||
$log_facility_real = pick($::aodh::log_facility,$log_facility)
|
||||
$log_dir_real = pick($::aodh::log_dir,$log_dir)
|
||||
$verbose_real = pick($::aodh::verbose,$verbose)
|
||||
$debug_real = pick($::aodh::debug,$debug)
|
||||
|
||||
oslo::log { 'aodh_config':
|
||||
debug => $debug_real,
|
||||
verbose => $verbose_real,
|
||||
use_syslog => $use_syslog_real,
|
||||
use_stderr => $use_stderr_real,
|
||||
log_dir => $log_dir_real,
|
||||
|
@@ -0,0 +1,4 @@
|
||||
---
|
||||
deprecations:
|
||||
- verbose option is now deprecated for removal, the
|
||||
parameter has no effect.
|
@@ -30,7 +30,6 @@ describe 'basic aodh' do
|
||||
class { '::aodh':
|
||||
rabbit_userid => 'aodh',
|
||||
rabbit_password => 'an_even_bigger_secret',
|
||||
verbose => true,
|
||||
debug => true,
|
||||
rabbit_host => '127.0.0.1',
|
||||
database_connection => 'mysql://aodh:a_big_secret@127.0.0.1/aodh?charset=utf8',
|
||||
|
@@ -34,7 +34,7 @@ describe 'aodh' do
|
||||
|
||||
context 'with overridden parameters' do
|
||||
let :params do
|
||||
{ :verbose => true,
|
||||
{
|
||||
:debug => true,
|
||||
:rabbit_host => 'rabbit',
|
||||
:rabbit_userid => 'rabbit_user',
|
||||
|
@@ -27,7 +27,6 @@ describe 'aodh::logging' do
|
||||
:use_stderr => false,
|
||||
:log_facility => 'LOG_FOO',
|
||||
:log_dir => '/var/log',
|
||||
:verbose => true,
|
||||
:debug => true,
|
||||
}
|
||||
end
|
||||
@@ -60,7 +59,6 @@ describe 'aodh::logging' do
|
||||
is_expected.to contain_aodh_config('DEFAULT/use_stderr').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('DEFAULT/syslog_log_facility').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('DEFAULT/log_dir').with(:value => '/var/log/aodh')
|
||||
is_expected.to contain_aodh_config('DEFAULT/verbose').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_aodh_config('DEFAULT/debug').with(:value => '<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
@@ -71,7 +69,6 @@ describe 'aodh::logging' do
|
||||
is_expected.to contain_aodh_config('DEFAULT/use_stderr').with(:value => 'false')
|
||||
is_expected.to contain_aodh_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_FOO')
|
||||
is_expected.to contain_aodh_config('DEFAULT/log_dir').with(:value => '/var/log')
|
||||
is_expected.to contain_aodh_config('DEFAULT/verbose').with(:value => 'true')
|
||||
is_expected.to contain_aodh_config('DEFAULT/debug').with(:value => 'true')
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user