devstack: clone Manila client only if marked to

Currently, Manila's devstack plugin clone manilaclient. Some projects
depend on Manila but would like to install packaged manilaclient.
Clone the manilaclient only if it was marked to be used from git

Change-Id: Ia8e726b9358f6901c172a31f638a59eba523e0fa
Depends-On: I94d2f143159b60c4f8693e35fe844bc1e411e580
This commit is contained in:
Yuval Brik 2017-05-03 11:20:32 +03:00
parent c7a2b21d7d
commit 65f4a1c564
2 changed files with 20 additions and 2 deletions

View File

@ -672,10 +672,20 @@ function _install_nfs_and_samba {
fi
}
# install_manilaclient - Collect source and prepare
# In order to install from git, add LIBS_FROM_GIT="python-manilaclient"
# to local.conf
function install_manilaclient {
if use_library_from_git "python-manilaclient"; then
git_clone $MANILACLIENT_REPO $MANILACLIENT_DIR $MANILACLIENT_BRANCH
setup_develop $MANILACLIENT_DIR
else
pip_install python-manilaclient
fi
}
# install_manila - Collect source and prepare
function install_manila {
git_clone $MANILACLIENT_REPO $MANILACLIENT_DIR $MANILACLIENT_BRANCH
setup_develop $MANILACLIENT_DIR
setup_develop $MANILA_DIR
if is_service_enabled m-shr; then
@ -928,6 +938,8 @@ function install_libraries {
# Main dispatcher
if [[ "$1" == "stack" && "$2" == "install" ]]; then
echo_summary "Installing Manila Client"
install_manilaclient
echo_summary "Installing Manila"
install_manila
set_cinder_quotas

View File

@ -59,6 +59,12 @@ Enable the manila plugin adding the following line to the end of the local.conf
enable_plugin manila https://github.com/openstack/manila
If you would like to install python-manilaclient from git, add to local.conf:
::
LIBS_FROM_GIT="python-manilaclient"
Manila UI
`````````