diff --git a/README.md b/README.md index 580ad9f5..7fe1f6e8 100644 --- a/README.md +++ b/README.md @@ -62,12 +62,12 @@ configuration and extra functionality through types and providers. The `sahara_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/sahara/sahara.conf` file. ```puppet -sahara_config { 'DEFAULT/verbose' : - value => true, +sahara_config { 'DEFAULT/use_neutron' : + value => True, } ``` -This will write `verbose=true` in the `[DEFAULT]` section. +This will write `use_neutron=True` in the `[DEFAULT]` section. ##### name diff --git a/examples/basic.pp b/examples/basic.pp index 9fa26230..9d99cbdf 100644 --- a/examples/basic.pp +++ b/examples/basic.pp @@ -23,7 +23,6 @@ class { '::sahara::db::mysql': # Then the common class class { '::sahara': database_connection => 'mysql+pymysql://sahara:a_big_secret@127.0.0.1:3306/sahara', - verbose => true, debug => true, admin_user => 'admin', admin_password => 'secrets_everywhere', diff --git a/manifests/init.pp b/manifests/init.pp index 1f2ab30f..db76e160 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -8,10 +8,6 @@ # (Optional) Ensure state for package # Defaults to 'present'. # -# [*verbose*] -# (Optional) Should the daemons log verbose messages -# Defaults to undef. -# # [*debug*] # (Optional) Should the daemons log debug messages # Defaults to undef. @@ -319,9 +315,12 @@ # (Optional) Receiver listening port. # Defaults to undef. # +# [*verbose*] +# (Optional) Deprecated. Should the daemons log verbose messages +# Defaults to undef. +# class sahara( $package_ensure = 'present', - $verbose = undef, $debug = undef, $use_syslog = undef, $use_stderr = undef, @@ -394,12 +393,17 @@ class sahara( $amqp_password = $::os_service_default, # DEPRECATED PARAMETERS $zeromq_port = undef, + $verbose = undef, ) { include ::sahara::params include ::sahara::logging include ::sahara::db include ::sahara::policy + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') + } + package { 'sahara-common': ensure => $package_ensure, name => $::sahara::params::common_package_name, diff --git a/manifests/logging.pp b/manifests/logging.pp index c50aed21..ab16068f 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. @@ -89,8 +85,13 @@ # 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 sahara::logging( - $verbose = $::os_service_default, $debug = $::os_service_default, $use_syslog = $::os_service_default, $use_stderr = $::os_service_default, @@ -107,6 +108,8 @@ class sahara::logging( $instance_format = $::os_service_default, $instance_uuid_format = $::os_service_default, $log_date_format = $::os_service_default, + # Deprecated + $verbose = undef, ) { # NOTE(degorenko): In order to keep backward compatibility we rely on the pick function @@ -115,12 +118,14 @@ class sahara::logging( $use_stderr_real = pick($::sahara::use_stderr, $use_stderr) $log_facility_real = pick($::sahara::log_facility, $log_facility) $log_dir_real = pick($::sahara::log_dir, $log_dir) - $verbose_real = pick($::sahara::verbose, $verbose) $debug_real = pick($::sahara::debug, $debug) + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') + } + oslo::log { 'sahara_config': debug => $debug_real, - verbose => $verbose_real, use_syslog => $use_syslog_real, use_stderr => $use_stderr_real, log_dir => $log_dir_real, diff --git a/releasenotes/notes/verbose-deprecation-2cc63616acbfd49e.yaml b/releasenotes/notes/verbose-deprecation-2cc63616acbfd49e.yaml new file mode 100644 index 00000000..ecfc2567 --- /dev/null +++ b/releasenotes/notes/verbose-deprecation-2cc63616acbfd49e.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - verbose option is now deprecated for removal, the + parameter has no effect. diff --git a/spec/classes/sahara_logging_spec.rb b/spec/classes/sahara_logging_spec.rb index 90354208..58aef9a7 100644 --- a/spec/classes/sahara_logging_spec.rb +++ b/spec/classes/sahara_logging_spec.rb @@ -9,7 +9,6 @@ describe 'sahara::logging' do let :log_params do { - :verbose => 'true', :debug => 'true', :use_syslog => 'true', :use_stderr => 'false', @@ -63,7 +62,6 @@ describe 'sahara::logging' do it { is_expected.to contain_sahara_config('DEFAULT/use_stderr').with_value('') } it { is_expected.to contain_sahara_config('DEFAULT/use_syslog').with_value('') } it { is_expected.to contain_sahara_config('DEFAULT/debug').with_value('') } - it { is_expected.to contain_sahara_config('DEFAULT/verbose').with_value('') } it { is_expected.to contain_sahara_config('DEFAULT/log_dir').with_value('/var/log/sahara') } end @@ -80,7 +78,6 @@ describe 'sahara::logging' do shared_examples_for 'basic logging options passed' do context 'with passed params' do it { is_expected.to contain_sahara_config('DEFAULT/debug').with_value(true) } - it { is_expected.to contain_sahara_config('DEFAULT/verbose').with_value(true) } it { is_expected.to contain_sahara_config('DEFAULT/use_syslog').with_value(true) } it { is_expected.to contain_sahara_config('DEFAULT/use_stderr').with_value(false) } it { is_expected.to contain_sahara_config('DEFAULT/syslog_log_facility').with_value('LOG_LOCAL0') }