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: I1f7a00764f73f2131285667108d80fcde4642e6e
This commit is contained in:
parent
41df393552
commit
67cd93acd8
@ -62,12 +62,12 @@ configuration and extra functionality through types and providers.
|
|||||||
The `sahara_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/sahara/sahara.conf` file.
|
The `sahara_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/sahara/sahara.conf` file.
|
||||||
|
|
||||||
```puppet
|
```puppet
|
||||||
sahara_config { 'DEFAULT/verbose' :
|
sahara_config { 'DEFAULT/use_neutron' :
|
||||||
value => true,
|
value => True,
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
This will write `verbose=true` in the `[DEFAULT]` section.
|
This will write `use_neutron=True` in the `[DEFAULT]` section.
|
||||||
|
|
||||||
##### name
|
##### name
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@ class { '::sahara::db::mysql':
|
|||||||
# Then the common class
|
# Then the common class
|
||||||
class { '::sahara':
|
class { '::sahara':
|
||||||
database_connection => 'mysql+pymysql://sahara:a_big_secret@127.0.0.1:3306/sahara',
|
database_connection => 'mysql+pymysql://sahara:a_big_secret@127.0.0.1:3306/sahara',
|
||||||
verbose => true,
|
|
||||||
debug => true,
|
debug => true,
|
||||||
admin_user => 'admin',
|
admin_user => 'admin',
|
||||||
admin_password => 'secrets_everywhere',
|
admin_password => 'secrets_everywhere',
|
||||||
|
@ -8,10 +8,6 @@
|
|||||||
# (Optional) Ensure state for package
|
# (Optional) Ensure state for package
|
||||||
# Defaults to 'present'.
|
# Defaults to 'present'.
|
||||||
#
|
#
|
||||||
# [*verbose*]
|
|
||||||
# (Optional) Should the daemons log verbose messages
|
|
||||||
# Defaults to undef.
|
|
||||||
#
|
|
||||||
# [*debug*]
|
# [*debug*]
|
||||||
# (Optional) Should the daemons log debug messages
|
# (Optional) Should the daemons log debug messages
|
||||||
# Defaults to undef.
|
# Defaults to undef.
|
||||||
@ -319,9 +315,12 @@
|
|||||||
# (Optional) Receiver listening port.
|
# (Optional) Receiver listening port.
|
||||||
# Defaults to undef.
|
# Defaults to undef.
|
||||||
#
|
#
|
||||||
|
# [*verbose*]
|
||||||
|
# (Optional) Deprecated. Should the daemons log verbose messages
|
||||||
|
# Defaults to undef.
|
||||||
|
#
|
||||||
class sahara(
|
class sahara(
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$verbose = undef,
|
|
||||||
$debug = undef,
|
$debug = undef,
|
||||||
$use_syslog = undef,
|
$use_syslog = undef,
|
||||||
$use_stderr = undef,
|
$use_stderr = undef,
|
||||||
@ -394,12 +393,17 @@ class sahara(
|
|||||||
$amqp_password = $::os_service_default,
|
$amqp_password = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
# DEPRECATED PARAMETERS
|
||||||
$zeromq_port = undef,
|
$zeromq_port = undef,
|
||||||
|
$verbose = undef,
|
||||||
) {
|
) {
|
||||||
include ::sahara::params
|
include ::sahara::params
|
||||||
include ::sahara::logging
|
include ::sahara::logging
|
||||||
include ::sahara::db
|
include ::sahara::db
|
||||||
include ::sahara::policy
|
include ::sahara::policy
|
||||||
|
|
||||||
|
if $verbose {
|
||||||
|
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
|
||||||
|
}
|
||||||
|
|
||||||
package { 'sahara-common':
|
package { 'sahara-common':
|
||||||
ensure => $package_ensure,
|
ensure => $package_ensure,
|
||||||
name => $::sahara::params::common_package_name,
|
name => $::sahara::params::common_package_name,
|
||||||
|
@ -4,10 +4,6 @@
|
|||||||
#
|
#
|
||||||
# === Parameters
|
# === Parameters
|
||||||
#
|
#
|
||||||
# [*verbose*]
|
|
||||||
# (Optional) Should the daemons log verbose messages
|
|
||||||
# Defaults to $::os_service_default.
|
|
||||||
#
|
|
||||||
# [*debug*]
|
# [*debug*]
|
||||||
# (Optional) Should the daemons log debug messages
|
# (Optional) Should the daemons log debug messages
|
||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
@ -89,8 +85,13 @@
|
|||||||
# Defaults to $::os_service_default.
|
# Defaults to $::os_service_default.
|
||||||
# Example: 'Y-%m-%d %H:%M:%S'
|
# Example: 'Y-%m-%d %H:%M:%S'
|
||||||
#
|
#
|
||||||
|
# DEPRECATED PARAMETERS
|
||||||
|
#
|
||||||
|
# [*verbose*]
|
||||||
|
# (Optional) Deprecated. Should the daemons log verbose messages
|
||||||
|
# Defaults to undef
|
||||||
|
#
|
||||||
class sahara::logging(
|
class sahara::logging(
|
||||||
$verbose = $::os_service_default,
|
|
||||||
$debug = $::os_service_default,
|
$debug = $::os_service_default,
|
||||||
$use_syslog = $::os_service_default,
|
$use_syslog = $::os_service_default,
|
||||||
$use_stderr = $::os_service_default,
|
$use_stderr = $::os_service_default,
|
||||||
@ -107,6 +108,8 @@ class sahara::logging(
|
|||||||
$instance_format = $::os_service_default,
|
$instance_format = $::os_service_default,
|
||||||
$instance_uuid_format = $::os_service_default,
|
$instance_uuid_format = $::os_service_default,
|
||||||
$log_date_format = $::os_service_default,
|
$log_date_format = $::os_service_default,
|
||||||
|
# Deprecated
|
||||||
|
$verbose = undef,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
# NOTE(degorenko): In order to keep backward compatibility we rely on the pick function
|
# NOTE(degorenko): In order to keep backward compatibility we rely on the pick function
|
||||||
@ -115,12 +118,14 @@ class sahara::logging(
|
|||||||
$use_stderr_real = pick($::sahara::use_stderr, $use_stderr)
|
$use_stderr_real = pick($::sahara::use_stderr, $use_stderr)
|
||||||
$log_facility_real = pick($::sahara::log_facility, $log_facility)
|
$log_facility_real = pick($::sahara::log_facility, $log_facility)
|
||||||
$log_dir_real = pick($::sahara::log_dir, $log_dir)
|
$log_dir_real = pick($::sahara::log_dir, $log_dir)
|
||||||
$verbose_real = pick($::sahara::verbose, $verbose)
|
|
||||||
$debug_real = pick($::sahara::debug, $debug)
|
$debug_real = pick($::sahara::debug, $debug)
|
||||||
|
|
||||||
|
if $verbose {
|
||||||
|
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
|
||||||
|
}
|
||||||
|
|
||||||
oslo::log { 'sahara_config':
|
oslo::log { 'sahara_config':
|
||||||
debug => $debug_real,
|
debug => $debug_real,
|
||||||
verbose => $verbose_real,
|
|
||||||
use_syslog => $use_syslog_real,
|
use_syslog => $use_syslog_real,
|
||||||
use_stderr => $use_stderr_real,
|
use_stderr => $use_stderr_real,
|
||||||
log_dir => $log_dir_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 'sahara::logging' do
|
|||||||
|
|
||||||
let :log_params do
|
let :log_params do
|
||||||
{
|
{
|
||||||
:verbose => 'true',
|
|
||||||
:debug => 'true',
|
:debug => 'true',
|
||||||
:use_syslog => 'true',
|
:use_syslog => 'true',
|
||||||
:use_stderr => 'false',
|
:use_stderr => 'false',
|
||||||
@ -63,7 +62,6 @@ describe 'sahara::logging' do
|
|||||||
it { is_expected.to contain_sahara_config('DEFAULT/use_stderr').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_sahara_config('DEFAULT/use_stderr').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_sahara_config('DEFAULT/use_syslog').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_sahara_config('DEFAULT/use_syslog').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_sahara_config('DEFAULT/debug').with_value('<SERVICE DEFAULT>') }
|
it { is_expected.to contain_sahara_config('DEFAULT/debug').with_value('<SERVICE DEFAULT>') }
|
||||||
it { is_expected.to contain_sahara_config('DEFAULT/verbose').with_value('<SERVICE DEFAULT>') }
|
|
||||||
it { is_expected.to contain_sahara_config('DEFAULT/log_dir').with_value('/var/log/sahara') }
|
it { is_expected.to contain_sahara_config('DEFAULT/log_dir').with_value('/var/log/sahara') }
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -80,7 +78,6 @@ describe 'sahara::logging' do
|
|||||||
shared_examples_for 'basic logging options passed' do
|
shared_examples_for 'basic logging options passed' do
|
||||||
context 'with passed params' do
|
context 'with passed params' do
|
||||||
it { is_expected.to contain_sahara_config('DEFAULT/debug').with_value(true) }
|
it { is_expected.to contain_sahara_config('DEFAULT/debug').with_value(true) }
|
||||||
it { is_expected.to contain_sahara_config('DEFAULT/verbose').with_value(true) }
|
|
||||||
it { is_expected.to contain_sahara_config('DEFAULT/use_syslog').with_value(true) }
|
it { is_expected.to contain_sahara_config('DEFAULT/use_syslog').with_value(true) }
|
||||||
it { is_expected.to contain_sahara_config('DEFAULT/use_stderr').with_value(false) }
|
it { is_expected.to contain_sahara_config('DEFAULT/use_stderr').with_value(false) }
|
||||||
it { is_expected.to contain_sahara_config('DEFAULT/syslog_log_facility').with_value('LOG_LOCAL0') }
|
it { is_expected.to contain_sahara_config('DEFAULT/syslog_log_facility').with_value('LOG_LOCAL0') }
|
||||||
|
Loading…
Reference in New Issue
Block a user