]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commitdiff
Remove gnocchi dispatcher
authorTobias Urdin <tobias.urdin@binero.se>
Tue, 20 Aug 2019 08:14:44 +0000 (10:14 +0200)
committerTobias Urdin <tobias.urdin@binero.se>
Tue, 20 Aug 2019 08:14:44 +0000 (10:14 +0200)
The gnocchi dispatcher has been deprecated for multiple cycles
and is no longer the prefered way to send options to gnocchi.

They should be sent as URL parameters when configuring the
gnocchi:// publisher in the pipelines.

Change-Id: Ica6b5248f0ef6b6d5dbdf8021598926899a3127e

manifests/dispatcher/gnocchi.pp [deleted file]
releasenotes/notes/remove-gnocchi-dispatcher-0fcce9d915f074e7.yaml [new file with mode: 0644]
spec/classes/ceilometer_dispatcher_gnocchi_spec.rb [deleted file]

diff --git a/manifests/dispatcher/gnocchi.pp b/manifests/dispatcher/gnocchi.pp
deleted file mode 100644 (file)
index 33c0f47..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-# == Class: ceilometer::dispatcher::gnocchi
-#
-# Configure Gnocchi dispatcher for Ceilometer
-#
-# === Parameters:
-#
-# [*filter_service_activity*]
-#   (Optional) Filter out samples generated by Gnocchi service activity.
-#   Defaults to $::os_service_default.
-#
-# [*filter_project*]
-#   (Optional) Gnocchi project used to filter out samples
-#   generated by Gnocchi service activity
-#   Defaults to $::os_service_default.
-#
-# [*archive_policy*]
-#   (Optional) The archive policy to use when the dispatcher
-#   Defaults to $::os_service_default.
-#
-# [*resources_definition_file*]
-#   (Optional) The Yaml file that defines mapping between samples
-#   and gnocchi resources/metrics.
-#   Defaults to $::os_service_default.
-#
-class ceilometer::dispatcher::gnocchi (
-  $filter_service_activity   = $::os_service_default,
-  $filter_project            = $::os_service_default,
-  $archive_policy            = $::os_service_default,
-  $resources_definition_file = $::os_service_default,
-) {
-
-  include ::ceilometer::deps
-
-  warning('The class ceilometer::dispatcher::gnocchi is deprecated. All its
-  options must be set as url parameters in
-  ceilometer::agent::notification::pipeline_publishers. Depending of the used
-  Gnocchi version their might be ignored.')
-
-  ceilometer_config {
-    'dispatcher_gnocchi/filter_service_activity':   value => $filter_service_activity;
-    'dispatcher_gnocchi/filter_project':            value => $filter_project;
-    'dispatcher_gnocchi/archive_policy':            value => $archive_policy;
-    'dispatcher_gnocchi/resources_definition_file': value => $resources_definition_file;
-  }
-
-}
diff --git a/releasenotes/notes/remove-gnocchi-dispatcher-0fcce9d915f074e7.yaml b/releasenotes/notes/remove-gnocchi-dispatcher-0fcce9d915f074e7.yaml
new file mode 100644 (file)
index 0000000..c5765f5
--- /dev/null
@@ -0,0 +1,7 @@
+---
+upgrade:
+  - |
+    The deprecated class ceilometer::dispatcher::gnocchi is removed.
+    All options that should be sent to gnocchi should be sent as URL parameters
+    defined in the pipeline publishers for example if using the notification
+    agent that is ceilometer::agent::notification::pipeline_publishers.
diff --git a/spec/classes/ceilometer_dispatcher_gnocchi_spec.rb b/spec/classes/ceilometer_dispatcher_gnocchi_spec.rb
deleted file mode 100644 (file)
index c72c8db..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-require 'spec_helper'
-
-describe 'ceilometer::dispatcher::gnocchi' do
-
-  let :pre_condition do
-    "class { 'ceilometer': telemetry_secret => 's3cr3t' }"
-  end
-
-  let :params do
-    {}
-  end
-
-  shared_examples_for 'ceilometer-gnocchi-dispatcher' do
-    it 'configures gnocchi dispatcher' do
-      is_expected.to contain_ceilometer_config('dispatcher_gnocchi/filter_service_activity').with_value('<SERVICE DEFAULT>')
-      is_expected.to contain_ceilometer_config('dispatcher_gnocchi/filter_project').with_value('<SERVICE DEFAULT>')
-      is_expected.to contain_ceilometer_config('dispatcher_gnocchi/archive_policy').with_value('<SERVICE DEFAULT>')
-      is_expected.to contain_ceilometer_config('dispatcher_gnocchi/resources_definition_file').with_value('<SERVICE DEFAULT>')
-    end
-
-    context 'when overriding parameters' do
-      before do
-        params.merge!(:filter_service_activity   => false,
-                      :filter_project            => 'gnocchi_swift',
-                      :archive_policy            => 'high',
-                      :resources_definition_file => 'foo')
-      end
-      it { is_expected.to contain_ceilometer_config('dispatcher_gnocchi/filter_service_activity').with_value('false') }
-      it { is_expected.to contain_ceilometer_config('dispatcher_gnocchi/filter_project').with_value('gnocchi_swift') }
-      it { is_expected.to contain_ceilometer_config('dispatcher_gnocchi/archive_policy').with_value('high') }
-      it { is_expected.to contain_ceilometer_config('dispatcher_gnocchi/resources_definition_file').with_value('foo') }
-    end
-  end
-
-  on_supported_os({
-    :supported_os   => OSDefaults.get_supported_os
-  }).each do |os,facts|
-    context "on #{os}" do
-      let (:facts) do
-        facts.merge(OSDefaults.get_facts())
-      end
-
-      it_behaves_like 'ceilometer-gnocchi-dispatcher'
-    end
-  end
-
-end