diff --git a/README.md b/README.md index 9c54759..ae3bc9f 100644 --- a/README.md +++ b/README.md @@ -48,12 +48,12 @@ configuration and extra functionality through types and providers. The `mistral_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/mistral/mistral.conf` file. ```puppet -mistral_config { 'DEFAULT/verbose' : - value => true, +mistral_config { 'DEFAULT/use_syslog' : + value => false, } ``` -This will write `verbose=true` in the `[DEFAULT]` section. +This will write `use_syslog=false` in the `[DEFAULT]` section. ##### name diff --git a/manifests/init.pp b/manifests/init.pp index 569867e..2d24aa8 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -48,10 +48,6 @@ # (Optional) Syslog facility to receive log lines. # Defaults to undef. # -# [*verbose*] -# (Optional) Should the daemons log verbose messages -# Defaults to undef. -# # [*debug*] # (Optional) Should the daemons log debug messages # Defaults to undef. @@ -183,6 +179,12 @@ # (optional) Number of seconds between heartbeats for coordination. # Defaults to $::os_service_default # +# DEPRECATED PARAMETERS +# +# [*verbose*] +# (Optional) DEPRECATED. Should the daemons log verbose messages +# Defaults to undef. +# class mistral( $keystone_password, $keystone_user = 'mistral', @@ -215,10 +217,11 @@ class mistral( $use_stderr = undef, $log_dir = '/var/log/mistral', $log_facility = undef, - $verbose = undef, $debug = undef, $coordination_backend_url = $::os_service_default, $coordination_heartbeat_interval = $::os_service_default, + # Deprecated + $verbose = undef, ){ include ::mistral::params @@ -233,6 +236,10 @@ class mistral( tag => ['openstack', 'mistral-package'], } + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') + } + mistral_config { 'keystone_authtoken/auth_uri': value => $auth_uri; 'keystone_authtoken/identity_uri': value => $identity_uri; diff --git a/manifests/logging.pp b/manifests/logging.pp index 25a91ee..207c88d 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -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 @@ -90,12 +86,17 @@ # Defaults to $::os_service_default # Example: 'Y-%m-%d %H:%M:%S' # +# DEPRECATED PARAMETERS +# +# [*verbose*] +# (Optional) Deprecated. Should the daemons log verbose messages +# Defaults to undef +# class mistral::logging( $use_syslog = $::os_service_default, $use_stderr = $::os_service_default, $log_facility = $::os_service_default, $log_dir = '/var/log/mistral', - $verbose = $::os_service_default, $debug = $::os_service_default, $logging_context_format_string = $::os_service_default, $logging_default_format_string = $::os_service_default, @@ -108,6 +109,8 @@ class mistral::logging( $instance_format = $::os_service_default, $instance_uuid_format = $::os_service_default, $log_date_format = $::os_service_default, + # Deprecated + $verbose = undef, ) { # NOTE(spredzy): In order to keep backward compatibility we rely on the pick function @@ -116,15 +119,17 @@ class mistral::logging( $use_stderr_real = pick($::mistral::use_stderr,$use_stderr) $log_facility_real = pick($::mistral::log_facility,$log_facility) $log_dir_real = pick($::mistral::log_dir,$log_dir) - $verbose_real = pick($::mistral::verbose,$verbose) $debug_real = pick($::mistral::debug,$debug) + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') + } + oslo::log { 'mistral_config': use_syslog => $use_syslog_real, use_stderr => $use_stderr_real, syslog_log_facility => $log_facility_real, log_dir => $log_dir_real, - verbose => $verbose_real, debug => $debug_real, default_log_levels => $default_log_levels, logging_context_format_string => $logging_context_format_string, diff --git a/releasenotes/notes/deprecate_verbose_parameter-ad43da49125142de.yaml b/releasenotes/notes/deprecate_verbose_parameter-ad43da49125142de.yaml new file mode 100644 index 0000000..ecfc256 --- /dev/null +++ b/releasenotes/notes/deprecate_verbose_parameter-ad43da49125142de.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - verbose option is now deprecated for removal, the + parameter has no effect. diff --git a/spec/acceptance/basic_mistral_spec.rb b/spec/acceptance/basic_mistral_spec.rb index 552e80a..0681bf2 100644 --- a/spec/acceptance/basic_mistral_spec.rb +++ b/spec/acceptance/basic_mistral_spec.rb @@ -40,7 +40,6 @@ describe 'basic mistral' do rabbit_password => 'an_even_bigger_secret', rabbit_host => '127.0.0.1', debug => true, - verbose => true, } class { '::mistral::keystone::auth': password => 'a_big_secret', diff --git a/spec/classes/mistral_logging_spec.rb b/spec/classes/mistral_logging_spec.rb index ed3ce71..ad0994b 100644 --- a/spec/classes/mistral_logging_spec.rb +++ b/spec/classes/mistral_logging_spec.rb @@ -27,7 +27,6 @@ describe 'mistral::logging' do :use_stderr => false, :log_facility => 'LOG_USER', :log_dir => '/var/log', - :verbose => true, :debug => true, } end @@ -56,7 +55,6 @@ describe 'mistral::logging' do is_expected.to contain_mistral_config('DEFAULT/use_stderr').with(:value => '') is_expected.to contain_mistral_config('DEFAULT/syslog_log_facility').with(:value => '') is_expected.to contain_mistral_config('DEFAULT/log_dir').with(:value => '/var/log/mistral') - is_expected.to contain_mistral_config('DEFAULT/verbose').with(:value => '') is_expected.to contain_mistral_config('DEFAULT/debug').with(:value => '') end end @@ -67,7 +65,6 @@ describe 'mistral::logging' do is_expected.to contain_mistral_config('DEFAULT/use_stderr').with(:value => 'false') is_expected.to contain_mistral_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_USER') is_expected.to contain_mistral_config('DEFAULT/log_dir').with(:value => '/var/log') - is_expected.to contain_mistral_config('DEFAULT/verbose').with(:value => 'true') is_expected.to contain_mistral_config('DEFAULT/debug').with(:value => 'true') end end