Add new function get_from_global_requirements
Instead of specifying the version of a library in devstack, use the version from global-requirements Add new function get_from_global_requirements and use it where it makes sense. Change-Id: I6b2f062761ac05ef72fc6cc9993bc204faf06fa5
This commit is contained in:
parent
d26da45b98
commit
d5ac785247
11
inc/python
11
inc/python
@ -95,6 +95,17 @@ function pip_install {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# get version of a package from global requirements file
|
||||||
|
# get_from_global_requirements <package>
|
||||||
|
function get_from_global_requirements {
|
||||||
|
local package=$1
|
||||||
|
local required_pkg=$(grep -h ${package} $REQUIREMENTS_DIR/global-requirements.txt | cut -d\# -f1)
|
||||||
|
if [[ $required_pkg == "" ]]; then
|
||||||
|
die $LINENO "Can't find package $package in requirements"
|
||||||
|
fi
|
||||||
|
echo $required_pkg
|
||||||
|
}
|
||||||
|
|
||||||
# should we use this library from their git repo, or should we let it
|
# should we use this library from their git repo, or should we let it
|
||||||
# get pulled in via pip dependencies.
|
# get pulled in via pip dependencies.
|
||||||
function use_library_from_git {
|
function use_library_from_git {
|
||||||
|
@ -182,8 +182,7 @@ function stop_horizon {
|
|||||||
# NOTE: It can be moved to common functions, but it is only used by compilation
|
# NOTE: It can be moved to common functions, but it is only used by compilation
|
||||||
# of django_openstack_auth catalogs at the moment.
|
# of django_openstack_auth catalogs at the moment.
|
||||||
function _prepare_message_catalog_compilation {
|
function _prepare_message_catalog_compilation {
|
||||||
local babel_package=$(grep ^Babel $REQUIREMENTS_DIR/global-requirements.txt)
|
pip_install $(get_from_global_requirements Babel)
|
||||||
pip_install "$babel_package"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -96,7 +96,8 @@ function remove_disabled_extensions {
|
|||||||
# configure_tempest() - Set config files, create data dirs, etc
|
# configure_tempest() - Set config files, create data dirs, etc
|
||||||
function configure_tempest {
|
function configure_tempest {
|
||||||
# install testr since its used to process tempest logs
|
# install testr since its used to process tempest logs
|
||||||
pip_install `grep -h testrepository $REQUIREMENTS_DIR/global-requirements.txt | cut -d\# -f1`
|
pip_install $(get_from_global_requirements testrepository)
|
||||||
|
|
||||||
local image_lines
|
local image_lines
|
||||||
local images
|
local images
|
||||||
local num_images
|
local num_images
|
||||||
|
Loading…
Reference in New Issue
Block a user