Deprecate use_syslog and enable_v1/v2_api
[DEFAULT/use_syslog] was deprecated in Mitaka [1] init.pp logging.pp - deprecate use_syslog, add warning, remove reference tests - remove use_syslog and [DEFAULT/use_syslog] verification. enable_v1/v2_api was deprecated in Mitaka [2] init.pp deprecate enable_v1_api, enable_v2_api add warning remove tests [1] http://docs.openstack.org/mitaka/config-reference/tables/conf-changes/cinder.html Change-Id: I76fd567f53ef8f0f4d351d52043e3ba2fea6f02f
This commit is contained in:
parent
dfa8320e5c
commit
35f4174cc5
@ -176,10 +176,6 @@
|
||||
# (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.
|
||||
@ -253,15 +249,6 @@
|
||||
# (Optional)
|
||||
# Defaults to '/etc/cinder/api-paste.ini',
|
||||
#
|
||||
# [*enable_v1_api*]
|
||||
# (Optional) Whether to enable the v1 API (true/false).
|
||||
# This will be deprecated in Kilo.
|
||||
# Defaults to 'true'.
|
||||
#
|
||||
# [*enable_v2_api*]
|
||||
# (Optional) Whether to enable the v2 API (true/false).
|
||||
# Defaults to 'true'.
|
||||
#
|
||||
# [*enable_v3_api*]
|
||||
# (Optional) Whether to enable the v3 API (true/false).
|
||||
# Defaults to 'true'.
|
||||
@ -294,6 +281,18 @@
|
||||
# (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 'true'.
|
||||
#
|
||||
# [*enable_v2_api*]
|
||||
# (Optional) DEPRECATED. Whether to enable the v2 API (true/false).
|
||||
# Defaults to 'true'.
|
||||
#
|
||||
class cinder (
|
||||
$database_connection = undef,
|
||||
$database_idle_timeout = undef,
|
||||
@ -345,15 +344,12 @@ 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',
|
||||
$debug = undef,
|
||||
$storage_availability_zone = 'nova',
|
||||
$default_availability_zone = false,
|
||||
$enable_v1_api = true,
|
||||
$enable_v2_api = true,
|
||||
$enable_v3_api = true,
|
||||
$lock_path = $::cinder::params::lock_path,
|
||||
$image_conversion_dir = $::os_service_default,
|
||||
@ -361,7 +357,9 @@ class cinder (
|
||||
$purge_config = false,
|
||||
# DEPRECATED PARAMETERS
|
||||
$verbose = undef,
|
||||
|
||||
$use_syslog = undef,
|
||||
$enable_v1_api = true,
|
||||
$enable_v2_api = true,
|
||||
) inherits cinder::params {
|
||||
|
||||
include ::cinder::db
|
||||
@ -380,6 +378,18 @@ 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 == true {
|
||||
warning('enable_v1_api is deprecated, has no effect and will be removed in a future release')
|
||||
}
|
||||
|
||||
if $enable_v2_api == true {
|
||||
warning('enable_v2_api is deprecated, has no effect and will be removed in a future release')
|
||||
}
|
||||
|
||||
# this anchor is used to simplify the graph between cinder components by
|
||||
# allowing a resource to serve as a point where the configuration of cinder begins
|
||||
anchor { 'cinder-start': }
|
||||
@ -478,10 +488,8 @@ class cinder (
|
||||
}
|
||||
}
|
||||
|
||||
# V1/V2/V3 APIs
|
||||
# V3 APIs
|
||||
cinder_config {
|
||||
'DEFAULT/enable_v1_api': value => $enable_v1_api;
|
||||
'DEFAULT/enable_v2_api': value => $enable_v2_api;
|
||||
'DEFAULT/enable_v3_api': value => $enable_v3_api;
|
||||
}
|
||||
|
||||
|
@ -7,10 +7,6 @@
|
||||
# (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
|
||||
@ -91,8 +87,11 @@
|
||||
# (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',
|
||||
@ -110,15 +109,19 @@ 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)
|
||||
@ -126,7 +129,6 @@ 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,
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
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,7 +23,6 @@ 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',
|
||||
@ -51,7 +50,6 @@ 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')
|
||||
@ -61,7 +59,6 @@ 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')
|
||||
|
@ -301,15 +301,11 @@ describe 'cinder' do
|
||||
describe 'with APIs set for Mitaka (proposed)' do
|
||||
let :params do
|
||||
{
|
||||
:enable_v1_api => false,
|
||||
:enable_v2_api => true,
|
||||
:enable_v3_api => true,
|
||||
:rabbit_password => 'guest',
|
||||
}
|
||||
end
|
||||
|
||||
it { is_expected.to contain_cinder_config('DEFAULT/enable_v1_api').with_value(false) }
|
||||
it { is_expected.to contain_cinder_config('DEFAULT/enable_v2_api').with_value(true) }
|
||||
it { is_expected.to contain_cinder_config('DEFAULT/enable_v3_api').with_value(true) }
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user