Add attribute sample_source

The sample_source is used to specific the source name of emitted
samples.It required to use different name if you want to consolidate
the data from different openstack region.
Changed the version to 9.1.2 and modified the change log and readme.

Change-Id: I0c2e0b6d651ad6c4daf724041014582b31337073
This commit is contained in:
hill 2014-07-02 22:39:00 +08:00
parent d3d61e474f
commit 869ca9824b
6 changed files with 19 additions and 1 deletions

View File

@ -1,6 +1,9 @@
openstack-telemetry Cookbook CHANGELG
==============================
This file is used to list changes made in each version of the openstack-metering cookbook.
## 9.1.2
* Add attribute sample_source
## 9.1.1
* Remove policy.json file, it's just a dup of what's in the package

View File

@ -62,6 +62,7 @@ Attributes
* `openstack['telemetry']['api']['auth']['version']` - Select v2.0 or v3.0. Default v2.0. The auth API version used to interact with identity service.
TODO: Add DB2 support on other platforms
* `openstack['telemetry']['platform']['db2_python_packages']` - Array of DB2 python packages, only available on redhat platform
* `openstack['telemetry']['sample_source'] - The source name of emitted samples, default value is openstack.
The following attributes are defined in attributes/default.rb of the common cookbook, but are documented here due to their relevance:

View File

@ -42,6 +42,8 @@ default['openstack']['telemetry']['service_user'] = 'ceilometer'
default['openstack']['telemetry']['service_tenant_name'] = 'service'
default['openstack']['telemetry']['service_role'] = 'admin'
default['openstack']['telemetry']['sample_source'] = 'openstack'
case node['openstack']['compute']['driver']
when 'libvirt.LibvirtDriver'
default['openstack']['telemetry']['hypervisor_inspector'] = 'libvirt'

View File

@ -4,7 +4,7 @@ maintainer_email 'cookbooks@lists.tfoundry.com'
license 'Apache 2.0'
description 'The OpenStack Metering service Ceilometer.'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '9.1.1'
version '9.1.2'
recipe 'openstack-telemetry::agent-central', 'Installs agent central service.'
recipe 'openstack-telemetry::agent-compute', 'Installs agent compute service.'

View File

@ -56,6 +56,17 @@ describe 'openstack-telemetry::common' do
)
end
it 'has default sample_source set' do
expect(chef_run).to render_file(file.name).with_content(
/^sample_source = openstack$/)
end
it 'has sample_source set' do
node.set['openstack']['telemetry']['sample_source'] = 'RegionOne'
expect(chef_run).to render_file(file.name).with_content(
/^sample_source = RegionOne$/)
end
it 'has default RPC/AMQP options set' do
[/^amqp_durable_queues=false$/,
/^amqp_auto_delete=false$/].each do |line|

View File

@ -12,6 +12,7 @@ hypervisor_inspector = <%= node["openstack"]["telemetry"]["hypervisor_inspector"
<% if node["openstack"]["telemetry"]["syslog"]["use"] %>
log_config = /etc/openstack/logging.conf
<% end %>
sample_source = <%= node["openstack"]["telemetry"]["sample_source"] %>
##### AMQP #####
notification_topics = notifications,glance_notifications