diff --git a/README.md b/README.md index 6a6ac731..7ebe059b 100644 --- a/README.md +++ b/README.md @@ -47,12 +47,12 @@ designate is a combination of Puppet manifest and ruby code to delivery configur The `designate_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/designate/designate.conf` file. ```puppet -designate_config { 'DEFAULT/verbose' : - value => true, +designate_config { 'DEFAULT/notification_driver' : + value => messaging, } ``` -This will write `verbose=true` in the `[DEFAULT]` section. +This will write `notification_driver=messaging` in the `[DEFAULT]` section. ##### name diff --git a/example/all-in-one-keystone.pp b/example/all-in-one-keystone.pp index 7b67b7d2..a0050e88 100644 --- a/example/all-in-one-keystone.pp +++ b/example/all-in-one-keystone.pp @@ -33,7 +33,6 @@ node /designate/ { } class { '::keystone': - verbose => true, validate_service => true, catalog_type => 'sql', enable_pki_setup => false, diff --git a/manifests/init.pp b/manifests/init.pp index 20abbe1f..5cc17bc4 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -20,10 +20,6 @@ # (optional) should the daemons log debug messages. # Defaults to undef # -# [*verbose*] -# (optional) should the daemons log verbose messages. -# Defaults to undef -# # [*use_syslog*] # (Optional) Use syslog for logging. # Defaults to undef @@ -111,11 +107,13 @@ # (optional) DEPRECATED. Use rabbit_virtual_host # Defaults to undef. # - +# [*verbose*] +# (optional) Deprecated. should the daemons log verbose messages. +# Defaults to undef +# class designate( $package_ensure = present, $common_package_name = $::designate::params::common_package_name, - $verbose = undef, $debug = undef, $log_dir = undef, $use_syslog = undef, @@ -138,8 +136,13 @@ class designate( $notification_topics = 'notifications', #DEPRECATED PARAMETER $rabbit_virtualhost = undef, + $verbose = undef, ) inherits designate::params { + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') + } + if $rabbit_virtualhost { warning('The parameter rabbit_virtualhost is deprecated, use rabbit_virtual_host.') $rabbit_virtual_host_real = $rabbit_virtualhost diff --git a/manifests/logging.pp b/manifests/logging.pp index a728f03a..cd85484b 100644 --- a/manifests/logging.pp +++ b/manifests/logging.pp @@ -4,10 +4,6 @@ # # == parameters # -# [*verbose*] -# (Optional) Should the daemons log verbose messages -# Defaults to 'false' -# # [*debug*] # (Optional) Should the daemons log debug messages # Defaults to 'false' @@ -83,18 +79,23 @@ # it like this (string value). # Defaults to undef. # Example: instance_uuid_format='[instance: %(uuid)s] ' - +# # [*log_date_format*] # (optional) Format string for %%(asctime)s in log records. # Defaults to undef. # Example: 'Y-%m-%d %H:%M:%S' - +# +# DEPRECATED PARAMETERS +# +# [*verbose*] +# (Optional) Deprecated. Should the daemons log verbose messages +# Defaults to undef +# class designate::logging( $use_syslog = false, $use_stderr = true, $log_facility = 'LOG_USER', $log_dir = $::designate::params::log_dir, - $verbose = false, $debug = false, $logging_context_format_string = undef, $logging_default_format_string = undef, @@ -107,20 +108,23 @@ class designate::logging( $instance_format = undef, $instance_uuid_format = undef, $log_date_format = undef, + #Deprecated + $verbose = undef, ) inherits ::designate::params { + 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 designate:: first then designate::logging::. $use_syslog_real = pick($::designate::use_syslog,$use_syslog) $use_stderr_real = pick($::designate::use_stderr,$use_stderr) $log_facility_real = pick($::designate::log_facility,$log_facility) $log_dir_real = pick($::designate::log_dir, $log_dir) - $verbose_real = pick($::designate::verbose,$verbose) $debug_real = pick($::designate::debug,$debug) designate_config { 'DEFAULT/debug' : value => $debug_real; - 'DEFAULT/verbose' : value => $verbose_real; 'DEFAULT/use_stderr' : value => $use_stderr_real; 'DEFAULT/use_syslog' : value => $use_syslog_real; 'DEFAULT/log_dir' : value => $log_dir_real; diff --git a/releasenotes/notes/verbose-deprecation-3db541c8862a6009.yaml b/releasenotes/notes/verbose-deprecation-3db541c8862a6009.yaml new file mode 100644 index 00000000..d0bbd78c --- /dev/null +++ b/releasenotes/notes/verbose-deprecation-3db541c8862a6009.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - verbose option is now deprecated for removal, the + parameter has no effect. diff --git a/spec/acceptance/basic_designate_spec.rb b/spec/acceptance/basic_designate_spec.rb index a4645466..7defbf4a 100644 --- a/spec/acceptance/basic_designate_spec.rb +++ b/spec/acceptance/basic_designate_spec.rb @@ -41,7 +41,6 @@ describe 'basic designate' do rabbit_password => 'an_even_bigger_secret', rabbit_host => '127.0.0.1', debug => true, - verbose => true, } class { '::designate::api': enabled => true, diff --git a/spec/classes/designate_init_spec.rb b/spec/classes/designate_init_spec.rb index b73c9578..85befbb8 100644 --- a/spec/classes/designate_init_spec.rb +++ b/spec/classes/designate_init_spec.rb @@ -9,7 +9,6 @@ describe 'designate' do { :package_ensure => 'installed', :debug => 'False', - :verbose => 'False', :root_helper => 'sudo designate-rootwrap /etc/designate/rootwrap.conf' } end diff --git a/spec/classes/designate_logging_spec.rb b/spec/classes/designate_logging_spec.rb index 231180f5..04a1e99b 100644 --- a/spec/classes/designate_logging_spec.rb +++ b/spec/classes/designate_logging_spec.rb @@ -27,7 +27,6 @@ describe 'designate::logging' do :use_stderr => false, :log_facility => 'LOG_FOO', :log_dir => '/var/log', - :verbose => true, :debug => true, } end @@ -58,7 +57,6 @@ describe 'designate::logging' do it 'configures designate logging settins with default values' do is_expected.to contain_designate_config('DEFAULT/use_syslog').with(:value => 'false') is_expected.to contain_designate_config('DEFAULT/use_stderr').with(:value => 'true') - is_expected.to contain_designate_config('DEFAULT/verbose').with(:value => 'false') is_expected.to contain_designate_config('DEFAULT/debug').with(:value => 'false') end end @@ -69,7 +67,6 @@ describe 'designate::logging' do is_expected.to contain_designate_config('DEFAULT/use_stderr').with(:value => 'false') is_expected.to contain_designate_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_FOO') is_expected.to contain_designate_config('DEFAULT/log_dir').with(:value => '/var/log') - is_expected.to contain_designate_config('DEFAULT/verbose').with(:value => 'true') is_expected.to contain_designate_config('DEFAULT/debug').with(:value => 'true') end end