diff --git a/README.md b/README.md index d5772a6a..d48291fc 100644 --- a/README.md +++ b/README.md @@ -54,12 +54,12 @@ manila is a combination of Puppet manifests and ruby code to delivery configurat The `manila_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/manila/manila.conf` file. ```puppet -manila_config { 'DEFAULT/verbose' : - value => true, +manila_config { 'DEFAULT/api_paste_config' : + value => /etc/manila/api-paste.ini, } ``` -This will write `verbose=true` in the `[DEFAULT]` section. +This will write `api_paste_config=/etc/manila/api-paste.ini` in the `[DEFAULT]` section. ##### name diff --git a/manifests/init.pp b/manifests/init.pp index c862e6ce..20840111 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -139,10 +139,6 @@ # (optional) CA certificate file to use to verify connecting clients # Defaults to false, not set_ # -# [*verbose*] -# (Optional) Should the daemons log verbose messages -# Defaults to false -# # [*debug*] # (Optional) Should the daemons log debug messages # Defaults to false @@ -206,6 +202,12 @@ # (optional) Accept clients using either SSL or plain TCP # Defaults to false # +# DEPRECATED PARAMETERS +# +# [*verbose*] +# (Optional) Deprecated. Should the daemons log verbose messages +# Defaults to undef +# class manila ( $sql_connection = undef, $sql_idle_timeout = undef, @@ -240,7 +242,6 @@ class manila ( $use_syslog = undef, $log_facility = undef, $log_dir = undef, - $verbose = undef, $debug = undef, $storage_availability_zone = 'nova', $rootwrap_config = '/etc/manila/rootwrap.conf', @@ -257,12 +258,18 @@ class manila ( $amqp_ssl_cert_file = $::os_service_default, $amqp_ssl_key_file = $::os_service_default, $amqp_ssl_key_password = $::os_service_default, + # Deprecated + $verbose = undef, ) { include ::manila::db include ::manila::logging include ::manila::params + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') + } + if $use_ssl { if !$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 39084fb4..0d728130 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 @@ -88,13 +84,18 @@ # (optional) Format string for %%(asctime)s in log records. # 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 manila::logging( $use_syslog = $::os_service_default, $use_stderr = $::os_service_default, $log_facility = $::os_service_default, $log_dir = '/var/log/manila', - $verbose = $::os_service_default, $debug = $::os_service_default, $logging_context_format_string = $::os_service_default, $logging_default_format_string = $::os_service_default, @@ -107,20 +108,25 @@ class manila::logging( $instance_format = $::os_service_default, $instance_uuid_format = $::os_service_default, $log_date_format = $::os_service_default, + # Deprecated + $verbose = undef, ) { + + 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 manila:: first then manila::logging::. $use_syslog_real = pick($::manila::use_syslog,$use_syslog) $use_stderr_real = pick($::manila::use_stderr,$use_stderr) $log_facility_real = pick($::manila::log_facility,$log_facility) $log_dir_real = pick($::manila::log_dir,$log_dir) - $verbose_real = pick($::manila::verbose,$verbose) $debug_real = pick($::manila::debug,$debug) oslo::log { 'manila_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-2a79546d0949ec91.yaml b/releasenotes/notes/verbose-deprecation-2a79546d0949ec91.yaml new file mode 100644 index 00000000..ecfc2567 --- /dev/null +++ b/releasenotes/notes/verbose-deprecation-2a79546d0949ec91.yaml @@ -0,0 +1,4 @@ +--- +deprecations: + - verbose option is now deprecated for removal, the + parameter has no effect. diff --git a/spec/acceptance/basic_manila_spec.rb b/spec/acceptance/basic_manila_spec.rb index 7fb6b3fd..2ef3258e 100644 --- a/spec/acceptance/basic_manila_spec.rb +++ b/spec/acceptance/basic_manila_spec.rb @@ -34,7 +34,6 @@ describe 'basic manila' do rabbit_password => 'an_even_bigger_secret', rabbit_host => '127.0.0.1', debug => true, - verbose => true, } class { '::manila::db::mysql': password => 'a_big_secret', diff --git a/spec/classes/manila_logging_spec.rb b/spec/classes/manila_logging_spec.rb index a6e1143b..4fcf86cd 100644 --- a/spec/classes/manila_logging_spec.rb +++ b/spec/classes/manila_logging_spec.rb @@ -27,7 +27,6 @@ describe 'manila::logging' do :use_stderr => false, :log_facility => 'LOG_FOO', :log_dir => '/var/log', - :verbose => true, :debug => true, } end @@ -59,7 +58,6 @@ describe 'manila::logging' do is_expected.to contain_manila_config('DEFAULT/use_syslog').with(:value => '') is_expected.to contain_manila_config('DEFAULT/use_stderr').with(:value => '') is_expected.to contain_manila_config('DEFAULT/log_dir').with(:value => '/var/log/manila') - is_expected.to contain_manila_config('DEFAULT/verbose').with(:value => '') is_expected.to contain_manila_config('DEFAULT/debug').with(:value => '') end end @@ -70,7 +68,6 @@ describe 'manila::logging' do is_expected.to contain_manila_config('DEFAULT/use_stderr').with(:value => 'false') is_expected.to contain_manila_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_FOO') is_expected.to contain_manila_config('DEFAULT/log_dir').with(:value => '/var/log') - is_expected.to contain_manila_config('DEFAULT/verbose').with(:value => 'true') is_expected.to contain_manila_config('DEFAULT/debug').with(:value => 'true') end end diff --git a/spec/classes/manila_spec.rb b/spec/classes/manila_spec.rb index eaee8b3d..eda31ea1 100644 --- a/spec/classes/manila_spec.rb +++ b/spec/classes/manila_spec.rb @@ -54,9 +54,6 @@ describe 'manila' do is_expected.to contain_manila_config('oslo_messaging_rabbit/rabbit_userid').with( :value => '' ) - is_expected.to contain_manila_config('DEFAULT/verbose').with( - :value => '' - ) is_expected.to contain_manila_config('DEFAULT/debug').with( :value => '' )