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 examples and README
-Remove verbose from tests.

If this option is not set explicitly, there is no such warning.

Change-Id: I2f554c07f71458894aaa5d8079285ac92d0f04a3
This commit is contained in:
Iury Gregory Melo Ferreira 2016-05-16 10:50:13 -03:00
parent 4e386acb4e
commit dbde71b855
13 changed files with 28 additions and 33 deletions

View File

@ -44,7 +44,6 @@ To utilize the keystone module's functionality you will need to declare multiple
```puppet
class { 'keystone':
verbose => True,
catalog_type => 'sql',
admin_token => 'random_uuid',
database_connection => 'mysql://keystone_admin:super_secret_db_password@openstack-controller.example.com/keystone',
@ -267,12 +266,12 @@ keystone is a combination of Puppet manifest and ruby code to delivery configura
The `keystone_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/keystone/keystone.conf` file.
```puppet
keystone_config { 'DEFAULT/verbose' :
value => true,
keystone_config { 'token/expiration' :
value => 3600,
}
```
This will write `verbose=true` in the `[DEFAULT]` section.
This will write `expiration=3600` in the `[token]` section.
##### name

View File

@ -25,7 +25,6 @@ class { '::keystone::db::mysql':
password => 'keystone',
}
class { '::keystone':
verbose => true,
debug => true,
database_connection => 'mysql://keystone:keystone@127.0.0.1/keystone',
catalog_type => 'sql',

View File

@ -25,7 +25,6 @@ class { '::keystone::db::mysql':
password => 'keystone',
}
class { '::keystone':
verbose => true,
debug => true,
database_connection => 'mysql://keystone_admin:keystone@127.0.0.1/keystone',
catalog_type => 'sql',

View File

@ -42,7 +42,6 @@ class { '::keystone::db::mysql':
}
class { '::keystone':
verbose => true,
debug => true,
database_connection => 'mysql://keystone:keystone@127.0.0.1/keystone',
catalog_type => 'sql',

View File

@ -1,5 +1,4 @@
class { '::keystone':
verbose => true,
debug => true,
database_connection => 'mysql://keystone:keystone@127.0.0.1/keystone',
admin_token => 'admin_token',

View File

@ -27,7 +27,6 @@ class { '::keystone::db::mysql':
password => 'keystone',
}
class { '::keystone':
verbose => true,
debug => true,
database_connection => 'mysql://keystone:keystone@127.0.0.1/keystone',
admin_token => 'admin_token',

View File

@ -10,7 +10,6 @@ class { '::keystone::db::mysql':
password => 'keystone',
}
class { '::keystone':
verbose => true,
debug => true,
database_connection => 'mysql://keystone:keystone@192.168.1.1/keystone',
admin_token => 'admin_token',

View File

@ -25,10 +25,6 @@
# Admin token that can be used to authenticate as a keystone
# admin. Required.
#
# [*verbose*]
# (optional) Rather keystone should log at verbose level.
# Defaults to undef.
#
# [*debug*]
# (optional) Rather keystone should log at debug level.
# Defaults to undef.
@ -542,13 +538,16 @@
# [*service_provider*]
# (optional) DEPRECATED. Provider, that can be used for keystone service.
#
# [*verbose*]
# (optional) DEPRECATED. Rather keystone should log at verbose level.
# Defaults to undef.
#
# == Dependencies
# None
#
# == Examples
#
# class { 'keystone':
# log_verbose => 'True',
# admin_token => 'my_special_token',
# }
#
@ -579,7 +578,6 @@ class keystone(
$admin_bind_host = '0.0.0.0',
$public_port = '5000',
$admin_port = '35357',
$verbose = undef,
$debug = undef,
$log_dir = undef,
$log_file = undef,
@ -678,6 +676,7 @@ class keystone(
$admin_workers = max($::processorcount, 2),
$public_workers = max($::processorcount, 2),
$service_provider = undef,
$verbose = undef,
) inherits keystone::params {
include ::keystone::deps
@ -687,6 +686,10 @@ class keystone(
warning('service_provider is deprecated, does nothing and will be removed in a future release, use a Puppet resource collector if you want to modify the service provider.')
}
if $verbose {
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
}
if ! $catalog_driver {
validate_re($catalog_type, 'template|sql')
}

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
@ -106,7 +102,12 @@
# (Optional) Uses logging handler designed to watch file system (boolean value).
# Defaults to $::os_service_default
#
# DEPRECATED
#
# [*verbose*]
# (Optional) Deprecated. Should the daemons log verbose messages
# Defaults to undef.
#
class keystone::logging(
$use_syslog = $::os_service_default,
@ -114,7 +115,6 @@ class keystone::logging(
$log_facility = $::os_service_default,
$log_dir = '/var/log/keystone',
$log_file = $::os_service_default,
$verbose = $::os_service_default,
$debug = $::os_service_default,
$logging_context_format_string = $::os_service_default,
$logging_default_format_string = $::os_service_default,
@ -129,10 +129,16 @@ class keystone::logging(
$instance_uuid_format = $::os_service_default,
$log_date_format = $::os_service_default,
$watch_log_file = $::os_service_default,
# DEPRECATED
$verbose = undef,
) {
include ::keystone::deps
if $verbose {
warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
}
# NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
# to use keystone::<myparam> first then keystone::logging::<myparam>.
$use_syslog_real = pick($::keystone::use_syslog,$use_syslog)
@ -140,12 +146,10 @@ class keystone::logging(
$log_facility_real = pick($::keystone::log_facility,$log_facility)
$log_dir_real = pick($::keystone::log_dir,$log_dir)
$log_file_real = pick($::keystone::log_file,$log_file)
$verbose_real = pick($::keystone::verbose,$verbose)
$debug_real = pick($::keystone::debug,$debug)
oslo::log { 'keystone_config':
debug => $debug_real,
verbose => $verbose_real,
log_config_append => $log_config_append,
log_date_format => $log_date_format,
log_file => $log_file_real,

View File

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

View File

@ -28,7 +28,6 @@ describe 'keystone::logging' do
:log_facility => 'LOG_FOO',
:log_dir => '/var/log',
:log_file => '/var/tmp/keystone_random.log',
:verbose => true,
:debug => true,
}
end
@ -39,7 +38,6 @@ describe 'keystone::logging' do
is_expected.to contain_keystone_config('DEFAULT/use_stderr').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/log_dir').with(:value => '/var/log/keystone')
is_expected.to contain_keystone_config('DEFAULT/log_file').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/verbose').with(:value => '<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/debug').with(:value => '<SERVICE DEFAULT>')
end
end
@ -51,7 +49,6 @@ describe 'keystone::logging' do
is_expected.to contain_keystone_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_FOO')
is_expected.to contain_keystone_config('DEFAULT/log_dir').with(:value => '/var/log')
is_expected.to contain_keystone_config('DEFAULT/log_file').with(:value => '/var/tmp/keystone_random.log')
is_expected.to contain_keystone_config('DEFAULT/verbose').with(:value => 'true')
is_expected.to contain_keystone_config('DEFAULT/debug').with(:value => 'true')
end
end

View File

@ -27,7 +27,6 @@ describe 'keystone' do
'admin_bind_host' => '0.0.0.0',
'public_port' => '5000',
'admin_port' => '35357',
'verbose' => false,
'debug' => false,
'use_stderr' => true,
'catalog_type' => 'sql',
@ -76,7 +75,6 @@ describe 'keystone' do
'public_port' => '5001',
'admin_port' => '35358',
'admin_token' => 'service_token_override',
'verbose' => true,
'debug' => true,
'use_stderr' => false,
'catalog_type' => 'template',
@ -157,7 +155,6 @@ describe 'keystone' do
'admin_bind_host',
'public_port',
'admin_port',
'verbose',
'debug',
'use_stderr'
].each do |config|

View File

@ -7,7 +7,6 @@ package { 'curl': ensure => present }
# with all of the default admin roles
node 'keystone_sqlite' {
class { '::keystone':
verbose => true,
debug => true,
catalog_type => 'sql',
admin_token => 'admin_token',
@ -28,7 +27,6 @@ node keystone_mysql {
password => 'keystone',
}
class { '::keystone':
verbose => true,
debug => true,
database_connection => 'mysql://keystone:keystone@127.0.0.1/keystone',
catalog_type => 'sql',
@ -44,7 +42,6 @@ node keystone_mysql {
# keystone with mysql on another node
node keystone {
class { '::keystone':
verbose => true,
debug => true,
database_connection => 'mysql://keystone:password@127.0.0.1/keystone',
catalog_type => 'sql',