Merge "Add NoSQL support for metering."

This commit is contained in:
Jenkins 2014-03-09 21:57:40 +00:00 committed by Gerrit Code Review
commit e8f2c7d0a7
5 changed files with 17 additions and 5 deletions

View File

@ -2,6 +2,10 @@ openstack-metering Cookbook CHANGELOG
==============================
This file is used to list changes made in each version of the openstack-metering cookbook.
## 8.2.0
### Blueprint
* Add NoSQL support for metering.
## 8.1.0
* Add client recipe

View File

@ -34,7 +34,7 @@ client
collector
----
- Installs nova network service.
- Installs collector package and service. If the NoSQL database is used for metering service, ceilometer-dbsync will not be executed.
common
----

View File

@ -4,13 +4,13 @@ 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 '8.1.0'
version '8.2.0'
recipe 'openstack-metering::agent-central', 'Installs agent central service.'
recipe 'openstack-metering::agent-compute', 'Installs agent compute service.'
recipe 'openstack-metering::api', 'Installs API service.'
recipe 'openstack-metering::client', 'Installs client.'
recipe 'openstack-metering::collector', 'Installs nova network service.'
recipe 'openstack-metering::collector', 'Installs collector service. If the NoSQL database is used for metering service, ceilometer-dbsync will not be executed.'
recipe 'openstack-metering::common', 'Common metering configuration.'
recipe 'openstack-metering::identity_registration', 'Registers the endpoints, tenant and user for metering service with Keystone'

View File

@ -24,8 +24,10 @@ include_recipe 'openstack-metering::common'
conf_switch = "--config-file #{node["openstack"]["metering"]["conf"]}"
execute 'database migration' do
command "ceilometer-dbsync #{conf_switch}"
unless node['openstack']['db']['metering']['nosql']['used']
execute 'database migration' do
command "ceilometer-dbsync #{conf_switch}"
end
end
platform = node['openstack']['metering']['platform']

View File

@ -16,6 +16,12 @@ describe 'openstack-metering::collector' do
expect(@chef_run).to run_execute command
end
it 'does not execute ceilometer dbsync when nosql database is used' do
@chef_run.node.set['openstack']['db']['metering']['nosql']['used'] = true
resource = 'execute[database migration]'
expect(@chef_run).not_to run_execute resource
end
it 'installs python-mysqldb', A: true do
expect(@chef_run).to install_package 'python-mysqldb'
end