Revert "Deprecate use_syslog and enable_v1/v2_api"
This commit partially reverts original commit. use_syslog option is not deprecated and still actual. This reverts commit I76fd567f53ef8f0f4d351d52043e3ba2fea6f02f Change-Id: I422bc5ce8560d805a93e2a23c5a2f0ffa9870b6b
This commit is contained in:
parent
c7044572a9
commit
04078aad69
@ -176,6 +176,10 @@
|
||||
# (Optional) Password for message broker authentication
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*use_syslog*]
|
||||
# (Optional) Use syslog for logging.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*database_connection*]
|
||||
# Url used to connect to database.
|
||||
# (Optional) Defaults to undef.
|
||||
@ -281,10 +285,6 @@
|
||||
# (Optional) DEPRECATED. Should the daemons log verbose messages
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*use_syslog*]
|
||||
# (Optional) DEPRECATED. Use syslog for logging.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*enable_v1_api*]
|
||||
# (Optional) DEPRECATED. Whether to enable the v1 API (true/false).
|
||||
# Defaults to undef.
|
||||
@ -344,6 +344,7 @@ class cinder (
|
||||
$cert_file = false,
|
||||
$key_file = false,
|
||||
$api_paste_config = '/etc/cinder/api-paste.ini',
|
||||
$use_syslog = undef,
|
||||
$use_stderr = undef,
|
||||
$log_facility = undef,
|
||||
$log_dir = '/var/log/cinder',
|
||||
@ -357,7 +358,6 @@ class cinder (
|
||||
$purge_config = false,
|
||||
# DEPRECATED PARAMETERS
|
||||
$verbose = undef,
|
||||
$use_syslog = undef,
|
||||
$enable_v1_api = undef,
|
||||
$enable_v2_api = undef,
|
||||
) inherits cinder::params {
|
||||
@ -378,10 +378,6 @@ class cinder (
|
||||
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
|
||||
}
|
||||
|
||||
if $use_syslog {
|
||||
warning('use_syslog is deprecated, has no effect and will be removed in a future release.')
|
||||
}
|
||||
|
||||
if $enable_v1_api {
|
||||
warning('enable_v1_api is deprecated, has no effect and will be removed in a future release')
|
||||
}
|
||||
|
@ -7,6 +7,10 @@
|
||||
# (Optional) Should the daemons log debug messages
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*use_syslog*]
|
||||
# (Optional) Use syslog for logging.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*use_stderr*]
|
||||
# (optional) Use stderr for logging
|
||||
# Defaults to $::os_service_default
|
||||
@ -87,11 +91,8 @@
|
||||
# (Optional) DEPRECATED. Should the daemons log verbose messages
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*use_syslog*]
|
||||
# (Optional) DEPRECATED. Use syslog for logging.
|
||||
# Defaults to undef
|
||||
#
|
||||
class cinder::logging(
|
||||
$use_syslog = $::os_service_default,
|
||||
$use_stderr = $::os_service_default,
|
||||
$log_facility = $::os_service_default,
|
||||
$log_dir = '/var/log/cinder',
|
||||
@ -109,19 +110,15 @@ class cinder::logging(
|
||||
$log_date_format = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$verbose = undef,
|
||||
$use_syslog = undef,
|
||||
) {
|
||||
|
||||
if $verbose {
|
||||
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
|
||||
}
|
||||
|
||||
if $use_syslog {
|
||||
warning('use_syslog is deprecated, has no effect and will be removed in a future release.')
|
||||
}
|
||||
|
||||
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
|
||||
# to use cinder::<myparam> if cinder::logging::<myparam> isn't specified.
|
||||
$use_syslog_real = pick($::cinder::use_syslog,$use_syslog)
|
||||
$use_stderr_real = pick($::cinder::use_stderr,$use_stderr)
|
||||
$log_facility_real = pick($::cinder::log_facility,$log_facility)
|
||||
$log_dir_real = pick($::cinder::log_dir,$log_dir)
|
||||
@ -129,6 +126,7 @@ class cinder::logging(
|
||||
|
||||
oslo::log { 'cinder_config':
|
||||
debug => $debug_real,
|
||||
use_syslog => $use_syslog_real,
|
||||
use_stderr => $use_stderr_real,
|
||||
log_dir => $log_dir_real,
|
||||
syslog_log_facility => $log_facility_real,
|
||||
|
@ -1,6 +1,4 @@
|
||||
---
|
||||
deprecations:
|
||||
- use_syslog in DEFAULT section was deprecated in Mitaka, this parameter
|
||||
has no effect and will be removed in a future release.
|
||||
- enable_v1_api and enable_v2_api are deprecated (no parameters to
|
||||
subistitute)
|
||||
|
@ -23,6 +23,7 @@ describe 'cinder::logging' do
|
||||
:instance_format => '[instance: %(uuid)s] ',
|
||||
:instance_uuid_format => '[instance: %(uuid)s] ',
|
||||
:log_date_format => '%Y-%m-%d %H:%M:%S',
|
||||
:use_syslog => false,
|
||||
:use_stderr => false,
|
||||
:log_facility => 'LOG_USER',
|
||||
:log_dir => '/var/log',
|
||||
@ -50,6 +51,7 @@ describe 'cinder::logging' do
|
||||
|
||||
shared_examples 'basic default logging settings' do
|
||||
it 'configures cinder logging settins with default values' do
|
||||
is_expected.to contain_cinder_config('DEFAULT/use_syslog').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('DEFAULT/use_stderr').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('DEFAULT/syslog_log_facility').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('DEFAULT/log_dir').with(:value => '/var/log/cinder')
|
||||
@ -59,6 +61,7 @@ describe 'cinder::logging' do
|
||||
|
||||
shared_examples 'basic non-default logging settings' do
|
||||
it 'configures cinder logging settins with non-default values' do
|
||||
is_expected.to contain_cinder_config('DEFAULT/use_syslog').with(:value => 'false')
|
||||
is_expected.to contain_cinder_config('DEFAULT/use_stderr').with(:value => 'false')
|
||||
is_expected.to contain_cinder_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_USER')
|
||||
is_expected.to contain_cinder_config('DEFAULT/log_dir').with(:value => '/var/log')
|
||||
|
Loading…
Reference in New Issue
Block a user