From 07be1986b44191600de8b9bf919bef395c3a8613 Mon Sep 17 00:00:00 2001 From: Luigi Toscano Date: Tue, 22 Oct 2019 18:12:27 +0200 Subject: [PATCH] Fix the barbicanclient installation not from source - follow the standard installation pattern for barbicanclient: only clones if it is installed from source. This way it is possible to install and test barbicanclient from pip by default, additional jobs can simply add it to required-projects; - define the repository metadata using the GIT* arrays. They are also defined by stackrc, but they should be probably removed from there; - remove the useless call of configure_barbicanclient (the same steps are already performed by install_barbicanclient). Going forward, configure_barbicanclient can be removed Change-Id: Iea1cd3f82c3b38f03f91b0191846e1ddbbfb1d6c (cherry picked from commit 646a0360b97d09146cb3b9a4d9bef927d074c239) --- devstack/lib/barbican | 8 +++++--- devstack/plugin.sh | 1 - devstack/settings | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/devstack/lib/barbican b/devstack/lib/barbican index 2adc2bbb4..626b3644c 100644 --- a/devstack/lib/barbican +++ b/devstack/lib/barbican @@ -72,7 +72,7 @@ function cleanup_barbican { # configure_barbicanclient - Set config files, create data dirs, etc function configure_barbicanclient { - setup_develop $BARBICANCLIENT_DIR + setup_dev_lib "python-barbicanclient" } # configure_dogtag_plugin - Change config to use dogtag plugin @@ -184,8 +184,10 @@ function install_barbican { # install_barbicanclient - Collect source and prepare function install_barbicanclient { - git_clone $BARBICANCLIENT_REPO $BARBICANCLIENT_DIR $BARBICANCLIENT_BRANCH - setup_develop $BARBICANCLIENT_DIR + if use_library_from_git "python-barbicanclient"; then + git_clone_by_name "python-barbicanclient" + setup_dev_lib "python-barbicanclient" + fi } # start_barbican - Start running processes, including screen diff --git a/devstack/plugin.sh b/devstack/plugin.sh index a75086c08..d49afab4b 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -49,7 +49,6 @@ if is_service_enabled barbican; then echo_summary "Configuring Vault plugin" configure_vault_plugin fi - configure_barbicanclient # Configure Cinder, Nova and Glance to use Barbican configure_core_services diff --git a/devstack/settings b/devstack/settings index 7e664735a..b881d4463 100644 --- a/devstack/settings +++ b/devstack/settings @@ -3,7 +3,6 @@ # Set up default directories BARBICAN_DIR=$DEST/barbican -BARBICANCLIENT_DIR=$DEST/python-barbicanclient BARBICAN_CONF_DIR=${BARBICAN_CONF_DIR:-/etc/barbican} BARBICAN_CONF=$BARBICAN_CONF_DIR/barbican.conf BARBICAN_PASTE_CONF=$BARBICAN_CONF_DIR/barbican-api-paste.ini @@ -29,9 +28,10 @@ BARBICAN_UWSGI_CONF=$BARBICAN_CONF_DIR/barbican-uwsgi.ini BARBICAN_REPO=${BARBICAN_REPO:-${GIT_BASE}/openstack/barbican.git} BARBICAN_BRANCH=${BARBICAN_BRANCH:-master} -# Set client library repository -BARBICANCLIENT_REPO=${BARBICANCLIENT_REPO:-${GIT_BASE}/openstack/python-barbicanclient.git} -BARBICANCLIENT_BRANCH=${BARBICANCLIENT_BRANCH:-master} +# python barbican client library +GITREPO["python-barbicanclient"]=${BARBICANCLIENT_REPO:-${GIT_BASE}/openstack/python-barbicanclient.git} +GITBRANCH["python-barbicanclient"]=${BARBICANCLIENT_BRANCH:-$TARGET_BRANCH} +GITDIR["python-barbicanclient"]=$DEST/python-barbicanclient # Set host href BARBICAN_HOST_HREF=${BARBICAN_HOST_HREF:-http://${SERVICE_HOST}/key-manager}