From 65f4a1c564490fc9840670ce44105bb6b434bb09 Mon Sep 17 00:00:00 2001 From: Yuval Brik Date: Wed, 3 May 2017 11:20:32 +0300 Subject: [PATCH] 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 --- devstack/plugin.sh | 16 ++++++++++++++-- .../devref/development-environment-devstack.rst | 6 ++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 5cdd0b58..67f399d6 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -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 diff --git a/doc/source/devref/development-environment-devstack.rst b/doc/source/devref/development-environment-devstack.rst index 194055d0..49b8e946 100644 --- a/doc/source/devref/development-environment-devstack.rst +++ b/doc/source/devref/development-environment-devstack.rst @@ -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 `````````