From 10e1fd420dbebec2a5e546266edfc748b8684f9b Mon Sep 17 00:00:00 2001 From: Ramy Asselin Date: Thu, 4 Jun 2015 12:12:15 -0700 Subject: [PATCH] Allow override of os-brick library used by cinder os-brick code was pulled out of cinder and made into its own library https://review.openstack.org/#/c/155552/ added to requirements: https://review.openstack.org/#/c/177372/ Integration tests were added https://review.openstack.org/#/c/188156/ But they still use the version of os-brick from pip. This change updates devstack to pull in the changes from os-brick patch sets instead, when configured to do so. Needed-by: Id2bc10782847861fe4bb5e9e46245654450e38fd Change-Id: I5359dd37dfe94bd469d5ca35f9fbaeda61b5fac4 --- lib/cinder | 8 ++++++++ stackrc | 4 ++++ tests/test_libs_from_pypi.sh | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/cinder b/lib/cinder index da22e29f84..b8cf8090dc 100644 --- a/lib/cinder +++ b/lib/cinder @@ -39,6 +39,7 @@ fi # set up default directories GITDIR["python-cinderclient"]=$DEST/python-cinderclient +GITDIR["os-brick"]=$DEST/os-brick CINDER_DIR=$DEST/cinder # Cinder virtual environment @@ -381,6 +382,13 @@ function init_cinder { # install_cinder() - Collect source and prepare function install_cinder { + # Install os-brick from git so we make sure we're testing + # the latest code. + if use_library_from_git "os-brick"; then + git_clone_by_name "os-brick" + setup_dev_lib "os-brick" + fi + git_clone $CINDER_REPO $CINDER_DIR $CINDER_BRANCH setup_develop $CINDER_DIR if [ "$CINDER_ISCSI_HELPER" = "tgtadm" ]; then diff --git a/stackrc b/stackrc index 09ba3e9807..f8add4b44d 100644 --- a/stackrc +++ b/stackrc @@ -441,6 +441,10 @@ SWIFT3_BRANCH=${SWIFT3_BRANCH:-master} GITREPO["ceilometermiddleware"]=${CEILOMETERMIDDLEWARE_REPO:-${GIT_BASE}/openstack/ceilometermiddleware.git} GITBRANCH["ceilometermiddleware"]=${CEILOMETERMIDDLEWARE_BRANCH:-master} +# os-brick library to manage local volume attaches +GITREPO["os-brick"]=${OS_BRICK_REPO:-${GIT_BASE}/openstack/os-brick.git} +GITBRANCH["os-brick"]=${OS_BRICK_BRANCH:-master} + ################## # diff --git a/tests/test_libs_from_pypi.sh b/tests/test_libs_from_pypi.sh index 8210d0a466..336a213bc5 100755 --- a/tests/test_libs_from_pypi.sh +++ b/tests/test_libs_from_pypi.sh @@ -39,7 +39,7 @@ ALL_LIBS+=" oslo.serialization python-saharaclient django_openstack_auth" ALL_LIBS+=" python-openstackclient oslo.rootwrap oslo.i18n" ALL_LIBS+=" python-ceilometerclient oslo.utils python-swiftclient" ALL_LIBS+=" python-neutronclient tooz ceilometermiddleware oslo.policy" -ALL_LIBS+=" debtcollector" +ALL_LIBS+=" debtcollector os-brick" # Generate the above list with # echo ${!GITREPO[@]}