Updates to params.pp for mongo and postgres packages

*) Removed the hardcoded postgres package from db.pp
*) Changed the mongo package to python-pymongo for RHEL

Change-Id: Ib975f9ce03ee8ffa423e75b62b595bcdefdd1eed
Signed-off-by: Francesco Vollero <fvollero@redhat.com>
This commit is contained in:
Francesco Vollero 2013-10-31 19:11:58 +01:00
parent 7ac2d80c4e
commit 0fb3b8f693
3 changed files with 18 additions and 18 deletions

View File

@ -22,8 +22,8 @@ class ceilometer::db (
$backend_package = false
include mysql::python
}
/^postgresql:\/\//: {
$backend_package = 'python-psycopg2'
/^postgres:\/\//: {
$backend_package = $::ceilometer::params::psycopg_package_name
}
/^mongodb:\/\//: {
$backend_package = $::ceilometer::params::pymongo_package_name

View File

@ -23,14 +23,13 @@ class ceilometer::params {
$collector_service_name = 'openstack-ceilometer-collector'
$alarm_notifier_service_name = 'openstack-ceilometer-alarm-notifier'
$alarm_evaluator_service_name = 'openstack-ceilometer-alarm-evaluator'
$pymongo_package_name = 'python-pymongo'
$psycopg_package_name = 'python-psycopg2'
# db packages
if $::operatingsystem == 'Fedora' and $::operatingsystemrelease >= 18 {
# name change in f18 : https://bugzilla.redhat.com/show_bug.cgi?id=954155
$pymongo_package_name = 'python-pymongo'
# fallback to stdlib version, not provided on fedora
$sqlite_package_name = undef
} else {
$pymongo_package_name = 'pymongo'
$sqlite_package_name = 'python-sqlite2'
}
@ -52,6 +51,7 @@ class ceilometer::params {
$alarm_notifier_service_name = 'ceilometer-alarm-notifier'
$alarm_evaluator_service_name = 'ceilometer-alarm-evaluator'
# db packages
$psycopg_package_name = 'python-psycopg2'
$pymongo_package_name = 'python-pymongo'
$sqlite_package_name = 'python-pysqlite2'

View File

@ -45,7 +45,7 @@ describe 'ceilometer::db' do
end
end
# RHEL has pymongo
# RHEL has python-pymongo too
context 'on Redhat platforms' do
let :facts do
{ :osfamily => 'Redhat',
@ -63,7 +63,7 @@ describe 'ceilometer::db' do
it 'installs pymongo package' do
should contain_package('ceilometer-backend-package').with(
:ensure => 'present',
:name => 'pymongo')
:name => 'python-pymongo')
end
end