Deprecate verbose option in logging
Option "verbose" from group "DEFAULT" is deprecated for removal. The parameter has no effect. Deprecated verbose in all classes Remove verbose from tests. If this option is not set explicitly, there is no such warning. Change-Id: Ie54817afda2b8f46aca970cc0b6aea3676d41df4
This commit is contained in:
parent
f20a8b8667
commit
5c543c7fc8
@ -8,10 +8,6 @@
|
||||
# (Optional) Ensure state for package
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# [*verbose*]
|
||||
# (Optional) Should the service log verbose messages
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*debug*]
|
||||
# (Optional) Should the service log debug messages
|
||||
# Defaults to undef
|
||||
@ -246,10 +242,13 @@
|
||||
# (Optional) Admin identity endpoint
|
||||
# Defaults to 'http://127.0.0.1:35357/'
|
||||
#
|
||||
# [*verbose*]
|
||||
# (Optional) Deprecated. Should the service log verbose messages
|
||||
# Defaults to undef
|
||||
#
|
||||
class murano(
|
||||
$admin_password,
|
||||
$package_ensure = 'present',
|
||||
$verbose = undef,
|
||||
$debug = undef,
|
||||
$use_syslog = undef,
|
||||
$use_stderr = undef,
|
||||
@ -302,8 +301,10 @@ class murano(
|
||||
$admin_user = 'murano',
|
||||
$admin_tenant_name = 'services',
|
||||
$auth_uri = 'http://127.0.0.1:5000',
|
||||
$identity_uri = 'http://127.0.0.1:35357/',
|
||||
$signing_dir = '/tmp/keystone-signing-muranoapi',
|
||||
# Deprecated
|
||||
$identity_uri = 'http://127.0.0.1:35357/',
|
||||
$verbose = undef,
|
||||
) {
|
||||
|
||||
include ::murano::params
|
||||
@ -313,6 +314,10 @@ class murano(
|
||||
|
||||
validate_string($admin_password)
|
||||
|
||||
if $verbose {
|
||||
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
|
||||
}
|
||||
|
||||
package { 'murano-common':
|
||||
ensure => $package_ensure,
|
||||
name => $::murano::params::common_package_name,
|
||||
|
@ -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.
|
||||
@ -89,8 +85,13 @@
|
||||
# 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 murano::logging(
|
||||
$verbose = $::os_service_default,
|
||||
$debug = $::os_service_default,
|
||||
$use_syslog = $::os_service_default,
|
||||
$use_stderr = $::os_service_default,
|
||||
@ -107,20 +108,24 @@ class murano::logging(
|
||||
$instance_format = $::os_service_default,
|
||||
$instance_uuid_format = $::os_service_default,
|
||||
$log_date_format = $::os_service_default,
|
||||
# Deprecated
|
||||
$verbose = undef,
|
||||
) {
|
||||
|
||||
|
||||
if $verbose {
|
||||
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
|
||||
}
|
||||
# NOTE(aderyugin): In order to keep backward compatibility we rely on the pick function
|
||||
# to use murano::<myparam> if murano::logging::<myparam> isn't specified.
|
||||
$use_syslog_real = pick($::murano::use_syslog, $use_syslog)
|
||||
$use_stderr_real = pick($::murano::use_stderr, $use_stderr)
|
||||
$log_facility_real = pick($::murano::log_facility, $log_facility)
|
||||
$log_dir_real = pick($::murano::log_dir, $log_dir)
|
||||
$verbose_real = pick($::murano::verbose, $verbose)
|
||||
$debug_real = pick($::murano::debug, $debug)
|
||||
|
||||
oslo::log { 'murano_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.
|
@ -9,7 +9,6 @@ describe 'murano::logging' do
|
||||
|
||||
let :log_params do
|
||||
{
|
||||
:verbose => 'true',
|
||||
:debug => 'true',
|
||||
:use_syslog => 'true',
|
||||
:use_stderr => 'false',
|
||||
@ -63,7 +62,6 @@ describe 'murano::logging' do
|
||||
it { is_expected.to contain_murano_config('DEFAULT/use_stderr').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_murano_config('DEFAULT/use_syslog').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_murano_config('DEFAULT/debug').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_murano_config('DEFAULT/verbose').with_value('<SERVICE DEFAULT>') }
|
||||
it { is_expected.to contain_murano_config('DEFAULT/log_dir').with_value('/var/log/murano') }
|
||||
end
|
||||
|
||||
@ -80,7 +78,6 @@ describe 'murano::logging' do
|
||||
shared_examples_for 'basic logging options passed' do
|
||||
context 'with passed params' do
|
||||
it { is_expected.to contain_murano_config('DEFAULT/debug').with_value(true) }
|
||||
it { is_expected.to contain_murano_config('DEFAULT/verbose').with_value(true) }
|
||||
it { is_expected.to contain_murano_config('DEFAULT/use_syslog').with_value(true) }
|
||||
it { is_expected.to contain_murano_config('DEFAULT/use_stderr').with_value(false) }
|
||||
it { is_expected.to contain_murano_config('DEFAULT/syslog_log_facility').with_value('LOG_LOCAL0') }
|
||||
|
Loading…
x
Reference in New Issue
Block a user