lib/database: Fixed a bug in database_connection_url
The changes from https://review.openstack.org/#/c/23364/ simplified the usage of database_connection_url_mysql and database_connection_url_postgresql without making the proper changes to database_connection_url. Fixes: bug #1167668 Signed-off-by: Tal Kain <tal.kain@ravellosystems.com> Change-Id: I5115d123ad794f2eb2e144b76932031af5248f26
This commit is contained in:
12
lib/database
12
lib/database
@@ -38,7 +38,7 @@ done
|
|||||||
for db in $DATABASE_BACKENDS; do
|
for db in $DATABASE_BACKENDS; do
|
||||||
# Set the type for the rest of the backend to use
|
# Set the type for the rest of the backend to use
|
||||||
if is_service_enabled $db; then
|
if is_service_enabled $db; then
|
||||||
# Set this now for the rest of the database funtions
|
# Set this now for the rest of the database functions
|
||||||
DATABASE_TYPE=$db
|
DATABASE_TYPE=$db
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@@ -110,13 +110,11 @@ function configure_database {
|
|||||||
configure_database_$DATABASE_TYPE
|
configure_database_$DATABASE_TYPE
|
||||||
}
|
}
|
||||||
|
|
||||||
# Generate an SQLAlchemy connection URL and store it in a variable
|
# Generate an SQLAlchemy connection URL and output it using echo
|
||||||
# $1 The variable name in which to store the connection URL
|
# $1 The name of the database
|
||||||
# $2 The name of the database
|
|
||||||
function database_connection_url {
|
function database_connection_url {
|
||||||
local var=$1
|
local db=$1
|
||||||
local db=$2
|
database_connection_url_$DATABASE_TYPE $db
|
||||||
database_connection_url_$DATABASE_TYPE $var $db
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user