From 8c53ac83eaf80326c91cb92c34bbb43e04938e1c Mon Sep 17 00:00:00 2001 From: baiziyu Date: Mon, 16 May 2022 16:59:46 +0800 Subject: [PATCH] Add venusclient install process Install venusclient when deploying venus-dashboard in devstack. Closes-Bug: #1973584 Change-Id: Iba5d969063427a7099f6cfeccc123cd7bc022854 --- devstack/plugin.sh | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 9c16502..a31b1cd 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -10,6 +10,23 @@ function configure_venus_dashboard { cp -a ${VENUS_DASHBOARD_DIR}/venus_dashboard/enabled/* ${HORIZON_DIR}/openstack_dashboard/local/enabled/ } +function install_venus_client { + VENUSCLINET_REPO="https://review.opendev.org/openstack/python-venusclient" + VENUSCLIENT_BRANCH="master" + VENUSCLIENT_DIR="${VENUS_DASHBOARD_DIR}/python-venusclient" + + if [[ ! -d $VENUSCLIENT_DIR ]]; then + git_clone $VENUSCLINET_REPO $VENUSCLIENT_DIR $VENUSCLIENT_BRANCH + + mv ${VENUSCLIENT_DIR}/venusclient ${VENUS_DASHBOARD_DIR}/venusclient + rm -rf ${VENUSCLIENT_DIR} + fi +} + +function remove_venus_client { + rm -rf ${VENUS_DASHBOARD_DIR}/venusclient +} + function init_venus_dashboard { $PYTHON ${DEST}/horizon/manage.py collectstatic --noinput $PYTHON ${DEST}/horizon/manage.py compress --force @@ -27,8 +44,9 @@ if is_service_enabled venus-dashboard; then # Perform installation of service source echo_summary "Installing Venus Dashboard" install_venus_dashboard + install_venus_client - elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then + elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then # Configure after the other layer 1 and 2 services have been configured echo_summary "Configuring Venus Dashboard" configure_venus_dashboard @@ -42,8 +60,7 @@ if is_service_enabled venus-dashboard; then if [[ "$1" == "unstack" ]]; then # Shut down venus-dashboard services - # no-op - : + remove_venus_client fi if [[ "$1" == "clean" ]]; then