From 475788101f50bcdb4edf5bca61ecf064249d6425 Mon Sep 17 00:00:00 2001 From: Iury Gregory Melo Ferreira Date: Wed, 18 May 2016 00:29:38 -0300 Subject: [PATCH] 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: Ie9ee71cafb029cc7c6183f3de4762218030a1032 --- README.md | 7 +++---- examples/cisco_ml2.pp | 1 - examples/neutron.pp | 1 - examples/neutron_with_pacemaker.pp | 1 - manifests/init.pp | 4 ++++ manifests/logging.pp | 11 +++++------ .../notes/verbose-deprecation-c3933b9e4aa8f7ad.yaml | 4 ++++ spec/acceptance/basic_neutron_spec.rb | 1 - spec/classes/neutron_init_spec.rb | 1 - spec/classes/neutron_logging_spec.rb | 3 --- 10 files changed, 16 insertions(+), 18 deletions(-) create mode 100644 releasenotes/notes/verbose-deprecation-c3933b9e4aa8f7ad.yaml diff --git a/README.md b/README.md index b1db9f1bf..2b10a85c5 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,6 @@ class { '::neutron': rabbit_host => '127.0.0.1', rabbit_user => 'neutron', rabbit_password => 'rabbit_secret', - verbose => false, debug => false, } @@ -101,12 +100,12 @@ neutron is a combination of Puppet manifest and ruby code to deliver configurati The `neutron_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/neutron/neutron.conf` file. ```puppet -neutron_config { 'DEFAULT/verbose' : - value => true, +neutron_config { 'DEFAULT/core_plugin' : + value => openvswitch, } ``` -This will write `verbose=true` in the `[DEFAULT]` section. +This will write `core_plugin=openvswitch` in the `[DEFAULT]` section. ##### name diff --git a/examples/cisco_ml2.pp b/examples/cisco_ml2.pp index 0a3c5a63c..4c9c1387e 100644 --- a/examples/cisco_ml2.pp +++ b/examples/cisco_ml2.pp @@ -4,7 +4,6 @@ class { '::neutron': rabbit_host => '127.0.0.1', rabbit_user => 'neutron', rabbit_password => 'rabbit_secret', - verbose => true, debug => true, } diff --git a/examples/neutron.pp b/examples/neutron.pp index 7e5afc7c2..94af5ff51 100644 --- a/examples/neutron.pp +++ b/examples/neutron.pp @@ -3,7 +3,6 @@ # General Neutron stuff # Configures everything in neutron.conf class { '::neutron': - verbose => true, allow_overlapping_ips => true, rabbit_password => 'password', rabbit_user => 'guest', diff --git a/examples/neutron_with_pacemaker.pp b/examples/neutron_with_pacemaker.pp index 3112cc58a..72cca6f10 100644 --- a/examples/neutron_with_pacemaker.pp +++ b/examples/neutron_with_pacemaker.pp @@ -23,7 +23,6 @@ # sudo pcs constraint colocation add neutron_server_service with neutron_vip class { '::neutron': - verbose => true, allow_overlapping_ips => true, service_plugins => [ 'dhcp', 'l3' ] } diff --git a/manifests/init.pp b/manifests/init.pp index c7bc4fe66..0cb2327e9 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -448,6 +448,10 @@ class neutron ( include ::neutron::logging } + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') + } + if ! is_service_default($use_ssl) and ($use_ssl) { if is_service_default($cert_file) { fail('The cert_file parameter is required when use_ssl is set to true') diff --git a/manifests/logging.pp b/manifests/logging.pp index 984a5e838..909afc041 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -105,10 +105,9 @@ # # [*verbose*] # (optional) Deprecated. Verbose logging -# Defaults to $::os_service_default +# Defaults to undef # class neutron::logging ( - $verbose = $::os_service_default, $debug = $::os_service_default, $use_syslog = $::os_service_default, $use_stderr = $::os_service_default, @@ -129,9 +128,10 @@ class neutron::logging ( $instance_format = $::os_service_default, $instance_uuid_format = $::os_service_default, $fatal_deprecations = $::os_service_default, + # Deprecated + $verbose = undef, ) { - $verbose_real = pick($::neutron::verbose,$verbose) $debug_real = pick($::neutron::debug,$debug) $use_syslog_real = pick($::neutron::use_syslog,$use_syslog) $use_stderr_real = pick($::neutron::use_stderr,$use_stderr) @@ -139,12 +139,11 @@ class neutron::logging ( $log_file_real = pick($::neutron::log_file,$log_file) $log_dir_real = pick($::neutron::log_dir,$log_dir) - if ! is_service_default($verbose_real) { - warning('verbose parameter is deprecated and will be removed.') + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') } oslo::log { 'neutron_config': - verbose => $verbose_real, debug => $debug_real, use_stderr => $use_stderr_real, use_syslog => $use_syslog_real, diff --git a/releasenotes/notes/verbose-deprecation-c3933b9e4aa8f7ad.yaml b/releasenotes/notes/verbose-deprecation-c3933b9e4aa8f7ad.yaml new file mode 100644 index 000000000..ecfc2567f --- /dev/null +++ b/releasenotes/notes/verbose-deprecation-c3933b9e4aa8f7ad.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - verbose option is now deprecated for removal, the + parameter has no effect. diff --git a/spec/acceptance/basic_neutron_spec.rb b/spec/acceptance/basic_neutron_spec.rb index 20445e76c..a27ef1c14 100644 --- a/spec/acceptance/basic_neutron_spec.rb +++ b/spec/acceptance/basic_neutron_spec.rb @@ -35,7 +35,6 @@ describe 'basic neutron' do allow_overlapping_ips => true, core_plugin => 'ml2', debug => true, - verbose => true, service_plugins => [ 'neutron.services.l3_router.l3_router_plugin.L3RouterPlugin', 'neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPlugin', diff --git a/spec/classes/neutron_init_spec.rb b/spec/classes/neutron_init_spec.rb index 5d2a3a7c4..6d39dd8f3 100644 --- a/spec/classes/neutron_init_spec.rb +++ b/spec/classes/neutron_init_spec.rb @@ -129,7 +129,6 @@ describe 'neutron' do end it 'configures neutron.conf' do - is_expected.to contain_neutron_config('DEFAULT/verbose').with_value( '' ) is_expected.to contain_neutron_config('DEFAULT/bind_host').with_value('') is_expected.to contain_neutron_config('DEFAULT/bind_port').with_value('') is_expected.to contain_neutron_config('DEFAULT/auth_strategy').with_value('keystone') diff --git a/spec/classes/neutron_logging_spec.rb b/spec/classes/neutron_logging_spec.rb index 16d0235d1..40573fb22 100644 --- a/spec/classes/neutron_logging_spec.rb +++ b/spec/classes/neutron_logging_spec.rb @@ -30,7 +30,6 @@ describe 'neutron::logging' do :log_dir => '/var/log', :log_file => 'neutron.log', :watch_log_file => true, - :verbose => true, :debug => true, } end @@ -61,7 +60,6 @@ describe 'neutron::logging' do is_expected.to contain_neutron_config('DEFAULT/log_dir').with(:value => '/var/log/neutron') is_expected.to contain_neutron_config('DEFAULT/log_file').with(:value => '') is_expected.to contain_neutron_config('DEFAULT/watch_log_file').with(:value => '') - is_expected.to contain_neutron_config('DEFAULT/verbose').with(:value => '') is_expected.to contain_neutron_config('DEFAULT/debug').with(:value => '') end end @@ -74,7 +72,6 @@ describe 'neutron::logging' do is_expected.to contain_neutron_config('DEFAULT/log_dir').with(:value => '/var/log') is_expected.to contain_neutron_config('DEFAULT/log_file').with(:value => 'neutron.log') is_expected.to contain_neutron_config('DEFAULT/watch_log_file').with(:value => 'true') - is_expected.to contain_neutron_config('DEFAULT/verbose').with(:value => 'true') is_expected.to contain_neutron_config('DEFAULT/debug').with(:value => 'true') end end