db: Remove MongoDB backend support
Support for MongoDB backend was used by puppet-ceilometer but it is no longer used since MongoDB was replaced by Gnocchi. Because we no longer expect any real use case, this change removes the implementation directly with deprecation skipped. Change-Id: I5203cefe77c6c1410842fa7c530f98761fe65ed4
This commit is contained in:
parent
4fcbddc632
commit
2ad73a71c0
@ -156,7 +156,7 @@ define oslo::db(
|
||||
if !is_service_default($connection) {
|
||||
|
||||
validate_legacy(Oslo::Dbconn, 'validate_re', $connection,
|
||||
['^(sqlite|mysql(\+pymysql)?|postgresql(\+psycopg2)?|mongodb):\/\/(\S+:\S+@\S+\/\S+)?'])
|
||||
['^(sqlite|mysql(\+pymysql)?|postgresql(\+psycopg2)?):\/\/(\S+:\S+@\S+\/\S+)?'])
|
||||
|
||||
if $manage_backend_package {
|
||||
case $connection {
|
||||
@ -173,9 +173,6 @@ define oslo::db(
|
||||
$backend_package = false
|
||||
require 'postgresql::lib::python'
|
||||
}
|
||||
/^mongodb:\/\//: {
|
||||
$backend_package = $::oslo::params::pymongo_package_name
|
||||
}
|
||||
/^sqlite:\/\//: {
|
||||
$backend_package = $::oslo::params::sqlite_package_name
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
class oslo::params {
|
||||
include openstacklib::defaults
|
||||
|
||||
$pymongo_package_name = 'python3-pymongo'
|
||||
$pylibmc_package_name = 'python3-pylibmc'
|
||||
|
||||
case $::osfamily {
|
||||
|
4
releasenotes/notes/remove-mongo-01c0895a76175bb4.yaml
Normal file
4
releasenotes/notes/remove-mongo-01c0895a76175bb4.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The ``oslo::db`` defined resource type no longer supports MongoDB backend.
|
@ -78,41 +78,6 @@ describe 'oslo::db' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with mongodb backend' do
|
||||
let :params do
|
||||
{ :connection => 'mongodb://localhost:1234/db' }
|
||||
end
|
||||
|
||||
it 'install the proper backend package' do
|
||||
is_expected.to contain_package(platform_params[:pymongo_package_name]).with(
|
||||
:ensure => 'present',
|
||||
:name => platform_params[:pymongo_package_name],
|
||||
:tag => 'openstack'
|
||||
)
|
||||
end
|
||||
|
||||
context 'with backend package management disabled' do
|
||||
before do
|
||||
params.merge!({
|
||||
:manage_backend_package => false,
|
||||
})
|
||||
end
|
||||
|
||||
it 'does not install backend package' do
|
||||
is_expected.not_to contain_package('python-pymongo')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'with specific mongodb connection string' do
|
||||
let :params do
|
||||
{ :connection => 'mongodb://user:password@host1:27017,host2:27017,host3:27017/db_name?replicaSet=replica&readPreference=primaryPreferred' }
|
||||
end
|
||||
|
||||
it { is_expected.to contain_keystone_config('database/connection').with_value(
|
||||
'mongodb://user:password@host1:27017,host2:27017,host3:27017/db_name?replicaSet=replica&readPreference=primaryPreferred').with_secret(true) }
|
||||
end
|
||||
|
||||
context 'with pymysql connection' do
|
||||
let :params do
|
||||
{ :connection => 'mysql+pymysql://db:db@localhost/db' }
|
||||
|
Loading…
x
Reference in New Issue
Block a user