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:
parent
7ac2d80c4e
commit
0fb3b8f693
@ -22,8 +22,8 @@ class ceilometer::db (
|
|||||||
$backend_package = false
|
$backend_package = false
|
||||||
include mysql::python
|
include mysql::python
|
||||||
}
|
}
|
||||||
/^postgresql:\/\//: {
|
/^postgres:\/\//: {
|
||||||
$backend_package = 'python-psycopg2'
|
$backend_package = $::ceilometer::params::psycopg_package_name
|
||||||
}
|
}
|
||||||
/^mongodb:\/\//: {
|
/^mongodb:\/\//: {
|
||||||
$backend_package = $::ceilometer::params::pymongo_package_name
|
$backend_package = $::ceilometer::params::pymongo_package_name
|
||||||
|
@ -9,28 +9,27 @@ class ceilometer::params {
|
|||||||
case $::osfamily {
|
case $::osfamily {
|
||||||
'RedHat': {
|
'RedHat': {
|
||||||
# package names
|
# package names
|
||||||
$agent_central_package_name = 'openstack-ceilometer-central'
|
$agent_central_package_name = 'openstack-ceilometer-central'
|
||||||
$agent_compute_package_name = 'openstack-ceilometer-compute'
|
$agent_compute_package_name = 'openstack-ceilometer-compute'
|
||||||
$api_package_name = 'openstack-ceilometer-api'
|
$api_package_name = 'openstack-ceilometer-api'
|
||||||
$collector_package_name = 'openstack-ceilometer-collector'
|
$collector_package_name = 'openstack-ceilometer-collector'
|
||||||
$alarm_package_name = 'openstack-ceilometer-alarm'
|
$alarm_package_name = 'openstack-ceilometer-alarm'
|
||||||
$common_package_name = 'openstack-ceilometer-common'
|
$common_package_name = 'openstack-ceilometer-common'
|
||||||
$client_package_name = 'python-ceilometerclient'
|
$client_package_name = 'python-ceilometerclient'
|
||||||
# service names
|
# service names
|
||||||
$agent_central_service_name = 'openstack-ceilometer-central'
|
$agent_central_service_name = 'openstack-ceilometer-central'
|
||||||
$agent_compute_service_name = 'openstack-ceilometer-compute'
|
$agent_compute_service_name = 'openstack-ceilometer-compute'
|
||||||
$api_service_name = 'openstack-ceilometer-api'
|
$api_service_name = 'openstack-ceilometer-api'
|
||||||
$collector_service_name = 'openstack-ceilometer-collector'
|
$collector_service_name = 'openstack-ceilometer-collector'
|
||||||
$alarm_notifier_service_name = 'openstack-ceilometer-alarm-notifier'
|
$alarm_notifier_service_name = 'openstack-ceilometer-alarm-notifier'
|
||||||
$alarm_evaluator_service_name = 'openstack-ceilometer-alarm-evaluator'
|
$alarm_evaluator_service_name = 'openstack-ceilometer-alarm-evaluator'
|
||||||
|
$pymongo_package_name = 'python-pymongo'
|
||||||
|
$psycopg_package_name = 'python-psycopg2'
|
||||||
# db packages
|
# db packages
|
||||||
if $::operatingsystem == 'Fedora' and $::operatingsystemrelease >= 18 {
|
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
|
# fallback to stdlib version, not provided on fedora
|
||||||
$sqlite_package_name = undef
|
$sqlite_package_name = undef
|
||||||
} else {
|
} else {
|
||||||
$pymongo_package_name = 'pymongo'
|
|
||||||
$sqlite_package_name = 'python-sqlite2'
|
$sqlite_package_name = 'python-sqlite2'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,6 +51,7 @@ class ceilometer::params {
|
|||||||
$alarm_notifier_service_name = 'ceilometer-alarm-notifier'
|
$alarm_notifier_service_name = 'ceilometer-alarm-notifier'
|
||||||
$alarm_evaluator_service_name = 'ceilometer-alarm-evaluator'
|
$alarm_evaluator_service_name = 'ceilometer-alarm-evaluator'
|
||||||
# db packages
|
# db packages
|
||||||
|
$psycopg_package_name = 'python-psycopg2'
|
||||||
$pymongo_package_name = 'python-pymongo'
|
$pymongo_package_name = 'python-pymongo'
|
||||||
$sqlite_package_name = 'python-pysqlite2'
|
$sqlite_package_name = 'python-pysqlite2'
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ describe 'ceilometer::db' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# RHEL has pymongo
|
# RHEL has python-pymongo too
|
||||||
context 'on Redhat platforms' do
|
context 'on Redhat platforms' do
|
||||||
let :facts do
|
let :facts do
|
||||||
{ :osfamily => 'Redhat',
|
{ :osfamily => 'Redhat',
|
||||||
@ -63,7 +63,7 @@ describe 'ceilometer::db' do
|
|||||||
it 'installs pymongo package' do
|
it 'installs pymongo package' do
|
||||||
should contain_package('ceilometer-backend-package').with(
|
should contain_package('ceilometer-backend-package').with(
|
||||||
:ensure => 'present',
|
:ensure => 'present',
|
||||||
:name => 'pymongo')
|
:name => 'python-pymongo')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user