Browse Source

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: I4b148ae18f5196951f7de2afdff2fe815becfdb6
Iury Gregory Melo Ferreira 3 years ago
parent
commit
7f70b7f548

+ 3
- 3
README.md View File

@@ -47,12 +47,12 @@ designate is a combination of Puppet manifest and ruby code to delivery configur
47 47
 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.
48 48
 
49 49
 ```puppet
50
-designate_config { 'DEFAULT/verbose' :
51
-  value => true,
50
+designate_config { 'DEFAULT/notification_driver' :
51
+  value => messaging,
52 52
 }
53 53
 ```
54 54
 
55
-This will write `verbose=true` in the `[DEFAULT]` section.
55
+This will write `notification_driver=messaging` in the `[DEFAULT]` section.
56 56
 
57 57
 ##### name
58 58
 

+ 0
- 1
example/all-in-one-keystone.pp View File

@@ -33,7 +33,6 @@ node /designate/ {
33 33
   }
34 34
 
35 35
   class { '::keystone':
36
-    verbose             => true,
37 36
     validate_service    => true,
38 37
     catalog_type        => 'sql',
39 38
     enable_pki_setup    => false,

+ 9
- 6
manifests/init.pp View File

@@ -20,10 +20,6 @@
20 20
 #   (optional) should the daemons log debug messages.
21 21
 #   Defaults to undef
22 22
 #
23
-# [*verbose*]
24
-#   (optional) should the daemons log verbose messages.
25
-#   Defaults to undef
26
-#
27 23
 # [*use_syslog*]
28 24
 #   (Optional) Use syslog for logging.
29 25
 #   Defaults to undef
@@ -111,11 +107,13 @@
111 107
 #   (optional) DEPRECATED. Use rabbit_virtual_host
112 108
 #   Defaults to undef.
113 109
 #
114
-
110
+# [*verbose*]
111
+#   (optional) Deprecated. should the daemons log verbose messages.
112
+#   Defaults to undef
113
+#
115 114
 class designate(
116 115
   $package_ensure        = present,
117 116
   $common_package_name   = $::designate::params::common_package_name,
118
-  $verbose               = undef,
119 117
   $debug                 = undef,
120 118
   $log_dir               = undef,
121 119
   $use_syslog            = undef,
@@ -138,8 +136,13 @@ class designate(
138 136
   $notification_topics   = 'notifications',
139 137
   #DEPRECATED PARAMETER
140 138
   $rabbit_virtualhost    = undef,
139
+  $verbose               = undef,
141 140
 ) inherits designate::params {
142 141
 
142
+  if $verbose {
143
+    warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
144
+  }
145
+
143 146
   if $rabbit_virtualhost {
144 147
     warning('The parameter rabbit_virtualhost is deprecated, use rabbit_virtual_host.')
145 148
     $rabbit_virtual_host_real = $rabbit_virtualhost

+ 13
- 9
manifests/logging.pp View File

@@ -4,10 +4,6 @@
4 4
 #
5 5
 # == parameters
6 6
 #
7
-#  [*verbose*]
8
-#    (Optional) Should the daemons log verbose messages
9
-#    Defaults to 'false'
10
-#
11 7
 #  [*debug*]
12 8
 #    (Optional) Should the daemons log debug messages
13 9
 #    Defaults to 'false'
@@ -83,18 +79,23 @@
83 79
 #               it like this (string value).
84 80
 #    Defaults to undef.
85 81
 #    Example: instance_uuid_format='[instance: %(uuid)s] '
86
-
82
+#
87 83
 #  [*log_date_format*]
88 84
 #    (optional) Format string for %%(asctime)s in log records.
89 85
 #    Defaults to undef.
90 86
 #    Example: 'Y-%m-%d %H:%M:%S'
91
-
87
+#
88
+#  DEPRECATED PARAMETERS
89
+#
90
+#  [*verbose*]
91
+#    (Optional) Deprecated. Should the daemons log verbose messages
92
+#    Defaults to undef
93
+#
92 94
 class designate::logging(
93 95
   $use_syslog                    = false,
94 96
   $use_stderr                    = true,
95 97
   $log_facility                  = 'LOG_USER',
96 98
   $log_dir                       = $::designate::params::log_dir,
97
-  $verbose                       = false,
98 99
   $debug                         = false,
99 100
   $logging_context_format_string = undef,
100 101
   $logging_default_format_string = undef,
@@ -107,20 +108,23 @@ class designate::logging(
107 108
   $instance_format               = undef,
108 109
   $instance_uuid_format          = undef,
109 110
   $log_date_format               = undef,
111
+  #Deprecated
112
+  $verbose                       = undef,
110 113
 ) inherits ::designate::params  {
111 114
 
115
+  if $verbose {
116
+    warning('verbose is deprecated, has no effect and will be removed after Newton cycle.')
117
+  }
112 118
   # NOTE(spredzy): In order to keep backward compatibility we rely on the pick function
113 119
   # to use designate::<myparam> first then designate::logging::<myparam>.
114 120
   $use_syslog_real = pick($::designate::use_syslog,$use_syslog)
115 121
   $use_stderr_real = pick($::designate::use_stderr,$use_stderr)
116 122
   $log_facility_real = pick($::designate::log_facility,$log_facility)
117 123
   $log_dir_real = pick($::designate::log_dir, $log_dir)
118
-  $verbose_real  = pick($::designate::verbose,$verbose)
119 124
   $debug_real = pick($::designate::debug,$debug)
120 125
 
121 126
   designate_config {
122 127
     'DEFAULT/debug'              : value => $debug_real;
123
-    'DEFAULT/verbose'            : value => $verbose_real;
124 128
     'DEFAULT/use_stderr'         : value => $use_stderr_real;
125 129
     'DEFAULT/use_syslog'         : value => $use_syslog_real;
126 130
     'DEFAULT/log_dir'            : value => $log_dir_real;

+ 4
- 0
releasenotes/notes/verbose-deprecation-3db541c8862a6009.yaml View File

@@ -0,0 +1,4 @@
1
+---
2
+deprecations:
3
+ - verbose option is now deprecated for removal, the
4
+   parameter has no effect.

+ 0
- 1
spec/acceptance/basic_designate_spec.rb View File

@@ -41,7 +41,6 @@ describe 'basic designate' do
41 41
             rabbit_password     => 'an_even_bigger_secret',
42 42
             rabbit_host         => '127.0.0.1',
43 43
             debug               => true,
44
-            verbose             => true,
45 44
           }
46 45
           class { '::designate::api':
47 46
             enabled           => true,

+ 0
- 1
spec/classes/designate_init_spec.rb View File

@@ -9,7 +9,6 @@ describe 'designate' do
9 9
     {
10 10
       :package_ensure     => 'installed',
11 11
       :debug              => 'False',
12
-      :verbose            => 'False',
13 12
       :root_helper        => 'sudo designate-rootwrap /etc/designate/rootwrap.conf'
14 13
     }
15 14
   end

+ 0
- 3
spec/classes/designate_logging_spec.rb View File

@@ -27,7 +27,6 @@ describe 'designate::logging' do
27 27
      :use_stderr => false,
28 28
      :log_facility => 'LOG_FOO',
29 29
      :log_dir => '/var/log',
30
-     :verbose => true,
31 30
      :debug => true,
32 31
     }
33 32
   end
@@ -58,7 +57,6 @@ describe 'designate::logging' do
58 57
     it 'configures designate logging settins with default values' do
59 58
       is_expected.to contain_designate_config('DEFAULT/use_syslog').with(:value => 'false')
60 59
       is_expected.to contain_designate_config('DEFAULT/use_stderr').with(:value => 'true')
61
-      is_expected.to contain_designate_config('DEFAULT/verbose').with(:value => 'false')
62 60
       is_expected.to contain_designate_config('DEFAULT/debug').with(:value => 'false')
63 61
     end
64 62
   end
@@ -69,7 +67,6 @@ describe 'designate::logging' do
69 67
       is_expected.to contain_designate_config('DEFAULT/use_stderr').with(:value => 'false')
70 68
       is_expected.to contain_designate_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_FOO')
71 69
       is_expected.to contain_designate_config('DEFAULT/log_dir').with(:value => '/var/log')
72
-      is_expected.to contain_designate_config('DEFAULT/verbose').with(:value => 'true')
73 70
       is_expected.to contain_designate_config('DEFAULT/debug').with(:value => 'true')
74 71
     end
75 72
   end

Loading…
Cancel
Save