summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md4
-rw-r--r--README.md2
-rw-r--r--metadata.rb4
-rw-r--r--recipes/collector.rb6
-rw-r--r--spec/collector_spec.rb6
5 files changed, 17 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b457a5d..d22a8a9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@ openstack-metering Cookbook CHANGELOG
2============================== 2==============================
3This file is used to list changes made in each version of the openstack-metering cookbook. 3This file is used to list changes made in each version of the openstack-metering cookbook.
4 4
5## 8.2.0
6### Blueprint
7* Add NoSQL support for metering.
8
5## 8.1.0 9## 8.1.0
6* Add client recipe 10* Add client recipe
7 11
diff --git a/README.md b/README.md
index aef6cc0..2572b1c 100644
--- a/README.md
+++ b/README.md
@@ -34,7 +34,7 @@ client
34 34
35collector 35collector
36---- 36----
37- Installs nova network service. 37- Installs collector package and service. If the NoSQL database is used for metering service, ceilometer-dbsync will not be executed.
38 38
39common 39common
40---- 40----
diff --git a/metadata.rb b/metadata.rb
index 03f998e..b1b8bcc 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -4,13 +4,13 @@ maintainer_email 'cookbooks@lists.tfoundry.com'
4license 'Apache 2.0' 4license 'Apache 2.0'
5description 'The OpenStack Metering service Ceilometer.' 5description 'The OpenStack Metering service Ceilometer.'
6long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 6long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
7version '8.1.0' 7version '8.2.0'
8 8
9recipe 'openstack-metering::agent-central', 'Installs agent central service.' 9recipe 'openstack-metering::agent-central', 'Installs agent central service.'
10recipe 'openstack-metering::agent-compute', 'Installs agent compute service.' 10recipe 'openstack-metering::agent-compute', 'Installs agent compute service.'
11recipe 'openstack-metering::api', 'Installs API service.' 11recipe 'openstack-metering::api', 'Installs API service.'
12recipe 'openstack-metering::client', 'Installs client.' 12recipe 'openstack-metering::client', 'Installs client.'
13recipe 'openstack-metering::collector', 'Installs nova network service.' 13recipe 'openstack-metering::collector', 'Installs collector service. If the NoSQL database is used for metering service, ceilometer-dbsync will not be executed.'
14recipe 'openstack-metering::common', 'Common metering configuration.' 14recipe 'openstack-metering::common', 'Common metering configuration.'
15recipe 'openstack-metering::identity_registration', 'Registers the endpoints with Keystone' 15recipe 'openstack-metering::identity_registration', 'Registers the endpoints with Keystone'
16 16
diff --git a/recipes/collector.rb b/recipes/collector.rb
index 5a342a4..8e6b64e 100644
--- a/recipes/collector.rb
+++ b/recipes/collector.rb
@@ -24,8 +24,10 @@ include_recipe 'openstack-metering::common'
24 24
25conf_switch = "--config-file #{node["openstack"]["metering"]["conf"]}" 25conf_switch = "--config-file #{node["openstack"]["metering"]["conf"]}"
26 26
27execute 'database migration' do 27unless node['openstack']['db']['metering']['nosql']['used']
28 command "ceilometer-dbsync #{conf_switch}" 28 execute 'database migration' do
29 command "ceilometer-dbsync #{conf_switch}"
30 end
29end 31end
30 32
31platform = node['openstack']['metering']['platform'] 33platform = node['openstack']['metering']['platform']
diff --git a/spec/collector_spec.rb b/spec/collector_spec.rb
index 70d1bc1..1d1e93c 100644
--- a/spec/collector_spec.rb
+++ b/spec/collector_spec.rb
@@ -16,6 +16,12 @@ describe 'openstack-metering::collector' do
16 expect(@chef_run).to run_execute command 16 expect(@chef_run).to run_execute command
17 end 17 end
18 18
19 it 'does not execute ceilometer dbsync when nosql database is used' do
20 @chef_run.node.set['openstack']['db']['metering']['nosql']['used'] = true
21 resource = 'execute[database migration]'
22 expect(@chef_run).not_to run_execute resource
23 end
24
19 it 'installs python-mysqldb', A: true do 25 it 'installs python-mysqldb', A: true do
20 expect(@chef_run).to install_package 'python-mysqldb' 26 expect(@chef_run).to install_package 'python-mysqldb'
21 end 27 end