diff --git a/manifests/statsd.pp b/manifests/statsd.pp index 9ec37b8e..c93c52d7 100644 --- a/manifests/statsd.pp +++ b/manifests/statsd.pp @@ -5,12 +5,6 @@ # [*resource_id*] # (required) Resource UUID to use to identify statsd in Gnocchi. # -# [*user_id*] -# (required) User UUID to use to identify statsd in Gnocchi. -# -# [*project_id*] -# (required) Project UUID to use to identify statsd in Gnocchi. -# # [*flush_delay*] # (required) Delay between flushes. # @@ -30,19 +24,38 @@ # (optional) Archive policy name to use when creating metrics. # Defaults to undef. # +# DEPRECATED PARAMETERS +# +# [*user_id*] +# (required) User UUID to use to identify statsd in Gnocchi. +# Defaults to undef. +# +# [*project_id*] +# (required) Project UUID to use to identify statsd in Gnocchi. +# Defaults to undef. +# class gnocchi::statsd ( $resource_id, - $user_id, - $project_id, $flush_delay, $archive_policy_name = undef, $manage_service = true, $enabled = true, $package_ensure = 'present', + # DEPRECATED PARAMETERS + $user_id = undef, + $project_id = undef, ) inherits gnocchi::params { include ::gnocchi::deps + if $user_id { + warning('user_id parameter is deprecated and will be removed in the future release.') + } + + if $project_id { + warning('project_id parameter is deprecated and will be removed in the future release.') + } + package { 'gnocchi-statsd': ensure => $package_ensure, name => $::gnocchi::params::statsd_package_name, @@ -68,8 +81,6 @@ class gnocchi::statsd ( gnocchi_config { 'statsd/resource_id' : value => $resource_id; - 'statsd/user_id' : value => $user_id; - 'statsd/project_id' : value => $project_id; 'statsd/archive_policy_name' : value => $archive_policy_name; 'statsd/flush_delay' : value => $flush_delay; } diff --git a/releasenotes/notes/deprecate_statsd_options-87315a345ef19816.yaml b/releasenotes/notes/deprecate_statsd_options-87315a345ef19816.yaml new file mode 100644 index 00000000..21c24a3a --- /dev/null +++ b/releasenotes/notes/deprecate_statsd_options-87315a345ef19816.yaml @@ -0,0 +1,3 @@ +--- +deprecations: + - user_id and project_id options are now deprecated for removal. diff --git a/spec/classes/gnocchi_statsd_spec.rb b/spec/classes/gnocchi_statsd_spec.rb index 77d5c74c..013367e4 100644 --- a/spec/classes/gnocchi_statsd_spec.rb +++ b/spec/classes/gnocchi_statsd_spec.rb @@ -6,8 +6,6 @@ describe 'gnocchi::statsd' do { :enabled => true, :manage_service => true, :resource_id => '07f26121-5777-48ba-8a0b-d70468133dd9', - :user_id => '07f26121-5777-48ba-8a0b-d70468133dd9', - :project_id => '07f26121-5777-48ba-8a0b-d70468133dd9', :archive_policy_name => 'high', :flush_delay => '200', } @@ -28,8 +26,6 @@ describe 'gnocchi::statsd' do it 'configures gnocchi statsd' do is_expected.to contain_gnocchi_config('statsd/resource_id').with_value('07f26121-5777-48ba-8a0b-d70468133dd9') - is_expected.to contain_gnocchi_config('statsd/user_id').with_value('07f26121-5777-48ba-8a0b-d70468133dd9') - is_expected.to contain_gnocchi_config('statsd/project_id').with_value('07f26121-5777-48ba-8a0b-d70468133dd9') is_expected.to contain_gnocchi_config('statsd/archive_policy_name').with_value('high') is_expected.to contain_gnocchi_config('statsd/flush_delay').with_value('200') end