Deprecate verbose option in logging

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: I0a3a42341e4dd32196beb793d718edf85850394f
This commit is contained in:
Iury Gregory Melo Ferreira 2016-05-18 01:41:21 -03:00
parent 3047ac81a3
commit dcc6dc20fd
7 changed files with 31 additions and 20 deletions

View File

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

View File

@ -8,10 +8,6 @@
# (Optional) Ensure state for package.
# Defaults to 'present'
#
# [*verbose*]
# (Optional) Should the daemons log verbose messages
# Defaults to undef.
#
# [*debug*]
# (Optional) Should the daemons log debug messages
# Defaults to undef.
@ -298,11 +294,16 @@
# (Optional) Run db sync on nodes after connection setting has been set.
# Defaults to true
#
# DEPRECATED PARAMETERS
#
# [*verbose*]
# (Optional) Deprecated. Should the daemons log verbose messages
# Defaults to undef.
#
class heat(
$auth_uri = 'http://127.0.0.1:5000/',
$identity_uri = 'http://127.0.0.1:35357/',
$package_ensure = 'present',
$verbose = undef,
$debug = undef,
$log_dir = undef,
$auth_plugin = undef,
@ -368,6 +369,8 @@ class heat(
$max_template_size = $::os_service_default,
$max_json_body_size = $::os_service_default,
$notification_driver = $::os_service_default,
# Deprecated
$verbose = undef,
) {
include ::heat::logging
@ -375,6 +378,10 @@ class heat(
include ::heat::deps
include ::heat::params
if $verbose {
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
}
package { 'heat-common':
ensure => $package_ensure,
name => $::heat::params::common_package_name,

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.
@ -89,12 +85,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 heat::logging(
$use_syslog = $::os_service_default,
$use_stderr = $::os_service_default,
$log_facility = $::os_service_default,
$log_dir = '/var/log/heat',
$verbose = $::os_service_default,
$debug = $::os_service_default,
$logging_context_format_string = $::os_service_default,
$logging_default_format_string = $::os_service_default,
@ -107,6 +108,8 @@ class heat::logging(
$instance_format = $::os_service_default,
$instance_uuid_format = $::os_service_default,
$log_date_format = $::os_service_default,
#Deprecated
$verbose = undef,
) {
include ::heat::deps
@ -117,12 +120,14 @@ class heat::logging(
$use_stderr_real = pick($::heat::use_stderr,$use_stderr)
$log_facility_real = pick($::heat::log_facility,$log_facility)
$log_dir_real = pick($::heat::log_dir,$log_dir)
$verbose_real = pick($::heat::verbose,$verbose)
$debug_real = pick($::heat::debug,$debug)
if $verbose {
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
}
oslo::log { 'heat_config':
debug => $debug_real,
verbose => $verbose_real,
log_config_append => $log_config_append,
log_date_format => $log_date_format,
log_dir => $log_dir_real,

View File

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

View File

@ -36,7 +36,6 @@ describe 'basic heat' do
identity_uri => 'http://127.0.0.1:35357/',
keystone_password => 'a_big_secret',
debug => true,
verbose => true,
}
class { '::heat::db::mysql':
password => 'a_big_secret',

View File

@ -5,7 +5,6 @@ describe 'heat' do
let :params do
{
:package_ensure => 'present',
:verbose => 'False',
:debug => 'False',
:use_stderr => 'True',
:log_dir => '/var/log/heat',

View File

@ -27,7 +27,6 @@ describe 'heat::logging' do
:use_stderr => false,
:log_facility => 'LOG_FOO',
:log_dir => '/var/log',
:verbose => true,
:debug => true,
}
end
@ -59,7 +58,6 @@ describe 'heat::logging' do
is_expected.to contain_heat_config('DEFAULT/use_syslog').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_heat_config('DEFAULT/use_stderr').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_heat_config('DEFAULT/log_dir').with(:value => '/var/log/heat')
is_expected.to contain_heat_config('DEFAULT/verbose').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_heat_config('DEFAULT/debug').with(:value => '<SERVICE DEFAULT>')
end
end
@ -70,7 +68,6 @@ describe 'heat::logging' do
is_expected.to contain_heat_config('DEFAULT/use_stderr').with(:value => 'false')
is_expected.to contain_heat_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_FOO')
is_expected.to contain_heat_config('DEFAULT/log_dir').with(:value => '/var/log')
is_expected.to contain_heat_config('DEFAULT/verbose').with(:value => 'true')
is_expected.to contain_heat_config('DEFAULT/debug').with(:value => 'true')
end
end