Merge "Add support for polling Radosgw metrics"
This commit is contained in:
commit
29fae2cabd
32
manifests/agent/polling/rgw.pp
Normal file
32
manifests/agent/polling/rgw.pp
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# == Class: ceilometer::agent::polling::rgw
|
||||||
|
#
|
||||||
|
# Configure rgw parameters
|
||||||
|
#
|
||||||
|
# === Parameters
|
||||||
|
#
|
||||||
|
# [*access_key*]
|
||||||
|
# (Optional) Access key for Radosgw Admin.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
# [*secret_key*]
|
||||||
|
# (Optional) Secret key for Radosgw Admin.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
# [*implicit_tenants*]
|
||||||
|
# (Optional) Whether RGW uses implicit tenants or not.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
|
class ceilometer::agent::polling::rgw (
|
||||||
|
$access_key = $::os_service_default,
|
||||||
|
$secret_key = $::os_service_default,
|
||||||
|
$implicit_tenants = $::os_service_default,
|
||||||
|
) {
|
||||||
|
|
||||||
|
include ceilometer::deps
|
||||||
|
|
||||||
|
ceilometer_config {
|
||||||
|
'rgw_admin_credentials/access_key': value => $access_key, secret => true;
|
||||||
|
'rgw_admin_credentials/secret_key': value => $secret_key, secret => true;
|
||||||
|
'rgw_client/implicit_tenants': value => $implicit_tenants;
|
||||||
|
}
|
||||||
|
}
|
@ -24,12 +24,17 @@
|
|||||||
# (Optional) cinder service type.
|
# (Optional) cinder service type.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
|
# [*radosgw*]
|
||||||
|
# (Optional) Radosgw service type.
|
||||||
|
# Defaults to $::os_service_default
|
||||||
|
#
|
||||||
class ceilometer::agent::polling::service_types (
|
class ceilometer::agent::polling::service_types (
|
||||||
$glance = $::os_service_default,
|
$glance = $::os_service_default,
|
||||||
$neutron = $::os_service_default,
|
$neutron = $::os_service_default,
|
||||||
$nova = $::os_service_default,
|
$nova = $::os_service_default,
|
||||||
$swift = $::os_service_default,
|
$swift = $::os_service_default,
|
||||||
$cinder = $::os_service_default,
|
$cinder = $::os_service_default,
|
||||||
|
$radosgw = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include ceilometer::deps
|
include ceilometer::deps
|
||||||
@ -40,5 +45,6 @@ class ceilometer::agent::polling::service_types (
|
|||||||
'service_types/nova': value => $nova;
|
'service_types/nova': value => $nova;
|
||||||
'service_types/swift': value => $swift;
|
'service_types/swift': value => $swift;
|
||||||
'service_types/cinder': value => $cinder;
|
'service_types/cinder': value => $cinder;
|
||||||
|
'service_types/radosgw': value => $radosgw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
5
releasenotes/notes/rgw-support-35ca7afb8e5ec322.yaml
Normal file
5
releasenotes/notes/rgw-support-35ca7afb8e5ec322.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Support for the parameters used to poll metrics from the Radosgw service
|
||||||
|
has been added.
|
41
spec/classes/ceilometer_agent_polling_rgw_spec.rb
Normal file
41
spec/classes/ceilometer_agent_polling_rgw_spec.rb
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe 'ceilometer::agent::polling::rgw' do
|
||||||
|
shared_examples 'ceilometer::agent::polling::rgw' do
|
||||||
|
context 'with default parameters' do
|
||||||
|
it 'configures the default values' do
|
||||||
|
is_expected.to contain_ceilometer_config('rgw_admin_credentials/access_key').with_value('<SERVICE DEFAULT>').with_secret(true)
|
||||||
|
is_expected.to contain_ceilometer_config('rgw_admin_credentials/secret_key').with_value('<SERVICE DEFAULT>').with_secret(true)
|
||||||
|
is_expected.to contain_ceilometer_config('rgw_client/implicit_tenants').with_value('<SERVICE DEFAULT>')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'with overridden parameters' do
|
||||||
|
let :params do
|
||||||
|
{
|
||||||
|
:access_key => 'access',
|
||||||
|
:secret_key => 'secret',
|
||||||
|
:implicit_tenants => true,
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'configures the overridden values' do
|
||||||
|
is_expected.to contain_ceilometer_config('rgw_admin_credentials/access_key').with_value('access')
|
||||||
|
is_expected.to contain_ceilometer_config('rgw_admin_credentials/secret_key').with_value('secret')
|
||||||
|
is_expected.to contain_ceilometer_config('rgw_client/implicit_tenants').with_value(true)
|
||||||
|
end
|
||||||
|
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::agent::polling::rgw'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -9,6 +9,7 @@ describe 'ceilometer::agent::polling::service_types' do
|
|||||||
is_expected.to contain_ceilometer_config('service_types/nova').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ceilometer_config('service_types/nova').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ceilometer_config('service_types/swift').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ceilometer_config('service_types/swift').with_value('<SERVICE DEFAULT>')
|
||||||
is_expected.to contain_ceilometer_config('service_types/cinder').with_value('<SERVICE DEFAULT>')
|
is_expected.to contain_ceilometer_config('service_types/cinder').with_value('<SERVICE DEFAULT>')
|
||||||
|
is_expected.to contain_ceilometer_config('service_types/radosgw').with_value('<SERVICE DEFAULT>')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -20,6 +21,7 @@ describe 'ceilometer::agent::polling::service_types' do
|
|||||||
:nova => 'compute',
|
:nova => 'compute',
|
||||||
:swift => 'object-store',
|
:swift => 'object-store',
|
||||||
:cinder => 'volumev3',
|
:cinder => 'volumev3',
|
||||||
|
:radosgw => 'alt-object-store',
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -29,6 +31,7 @@ describe 'ceilometer::agent::polling::service_types' do
|
|||||||
is_expected.to contain_ceilometer_config('service_types/nova').with_value('compute')
|
is_expected.to contain_ceilometer_config('service_types/nova').with_value('compute')
|
||||||
is_expected.to contain_ceilometer_config('service_types/swift').with_value('object-store')
|
is_expected.to contain_ceilometer_config('service_types/swift').with_value('object-store')
|
||||||
is_expected.to contain_ceilometer_config('service_types/cinder').with_value('volumev3')
|
is_expected.to contain_ceilometer_config('service_types/cinder').with_value('volumev3')
|
||||||
|
is_expected.to contain_ceilometer_config('service_types/radosgw').with_value('alt-object-store')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user