Deprecate verbose parameter

Option "verbose" from group "DEFAULT" is deprecated for removal.
The parameter has no effect.
-Deprecated verbose for logging and init
-Remove verbose in README
-Remove verbose from tests.
If this option is not set explicitly, there is no such warning

Change-Id: Ib9cddc4f1b1b03e85118fa3c8390b69b02e7dd7f
This commit is contained in:
ZhongShengping
2016-05-19 10:07:24 +08:00
parent 7e68c28e53
commit a252b8b5f4
6 changed files with 31 additions and 19 deletions

View File

@@ -48,12 +48,12 @@ configuration and extra functionality through types and providers.
The `mistral_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/mistral/mistral.conf` file.
```puppet
mistral_config { 'DEFAULT/verbose' :
value => true,
mistral_config { 'DEFAULT/use_syslog' :
value => false,
}
```
This will write `verbose=true` in the `[DEFAULT]` section.
This will write `use_syslog=false` in the `[DEFAULT]` section.
##### name

View File

@@ -48,10 +48,6 @@
# (Optional) Syslog facility to receive log lines.
# Defaults to undef.
#
# [*verbose*]
# (Optional) Should the daemons log verbose messages
# Defaults to undef.
#
# [*debug*]
# (Optional) Should the daemons log debug messages
# Defaults to undef.
@@ -183,6 +179,12 @@
# (optional) Number of seconds between heartbeats for coordination.
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*verbose*]
# (Optional) DEPRECATED. Should the daemons log verbose messages
# Defaults to undef.
#
class mistral(
$keystone_password,
$keystone_user = 'mistral',
@@ -215,10 +217,11 @@ class mistral(
$use_stderr = undef,
$log_dir = '/var/log/mistral',
$log_facility = undef,
$verbose = undef,
$debug = undef,
$coordination_backend_url = $::os_service_default,
$coordination_heartbeat_interval = $::os_service_default,
# Deprecated
$verbose = undef,
){
include ::mistral::params
@@ -233,6 +236,10 @@ class mistral(
tag => ['openstack', 'mistral-package'],
}
if $verbose {
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
}
mistral_config {
'keystone_authtoken/auth_uri': value => $auth_uri;
'keystone_authtoken/identity_uri': value => $identity_uri;

View File

@@ -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
@@ -90,12 +86,17 @@
# 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 mistral::logging(
$use_syslog = $::os_service_default,
$use_stderr = $::os_service_default,
$log_facility = $::os_service_default,
$log_dir = '/var/log/mistral',
$verbose = $::os_service_default,
$debug = $::os_service_default,
$logging_context_format_string = $::os_service_default,
$logging_default_format_string = $::os_service_default,
@@ -108,6 +109,8 @@ class mistral::logging(
$instance_format = $::os_service_default,
$instance_uuid_format = $::os_service_default,
$log_date_format = $::os_service_default,
# Deprecated
$verbose = undef,
) {
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
@@ -116,15 +119,17 @@ class mistral::logging(
$use_stderr_real = pick($::mistral::use_stderr,$use_stderr)
$log_facility_real = pick($::mistral::log_facility,$log_facility)
$log_dir_real = pick($::mistral::log_dir,$log_dir)
$verbose_real = pick($::mistral::verbose,$verbose)
$debug_real = pick($::mistral::debug,$debug)
if $verbose {
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
}
oslo::log { 'mistral_config':
use_syslog => $use_syslog_real,
use_stderr => $use_stderr_real,
syslog_log_facility => $log_facility_real,
log_dir => $log_dir_real,
verbose => $verbose_real,
debug => $debug_real,
default_log_levels => $default_log_levels,
logging_context_format_string => $logging_context_format_string,

View File

@@ -0,0 +1,4 @@
---
deprecations:
- verbose option is now deprecated for removal, the
parameter has no effect.

View File

@@ -40,7 +40,6 @@ describe 'basic mistral' do
rabbit_password => 'an_even_bigger_secret',
rabbit_host => '127.0.0.1',
debug => true,
verbose => true,
}
class { '::mistral::keystone::auth':
password => 'a_big_secret',

View File

@@ -27,7 +27,6 @@ describe 'mistral::logging' do
:use_stderr => false,
:log_facility => 'LOG_USER',
:log_dir => '/var/log',
:verbose => true,
:debug => true,
}
end
@@ -56,7 +55,6 @@ describe 'mistral::logging' do
is_expected.to contain_mistral_config('DEFAULT/use_stderr').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('DEFAULT/syslog_log_facility').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('DEFAULT/log_dir').with(:value => '/var/log/mistral')
is_expected.to contain_mistral_config('DEFAULT/verbose').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_mistral_config('DEFAULT/debug').with(:value => '<SERVICE DEFAULT>')
end
end
@@ -67,7 +65,6 @@ describe 'mistral::logging' do
is_expected.to contain_mistral_config('DEFAULT/use_stderr').with(:value => 'false')
is_expected.to contain_mistral_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_USER')
is_expected.to contain_mistral_config('DEFAULT/log_dir').with(:value => '/var/log')
is_expected.to contain_mistral_config('DEFAULT/verbose').with(:value => 'true')
is_expected.to contain_mistral_config('DEFAULT/debug').with(:value => 'true')
end
end