Remove gnocchi dispatcher
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
This commit is contained in:
parent
7949e78c68
commit
d10a6d9c28
|
@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -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.
|
|
@ -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
|
|
Loading…
Reference in New Issue