From f82333101f2defd7de86bda0d0cba2cc61f3a907 Mon Sep 17 00:00:00 2001 From: Mark Vanderwiel Date: Mon, 25 Jan 2016 16:36:50 -0600 Subject: [PATCH] Cleanup devstack install and configure - Use standard $DEST for plugin base dir - No need for explicit pip install, handled by devstack - No need for manage compress - Fix up cleanup to remove files added to enabled dir Change-Id: Ifcffd42ef2fc850cf89ce5d8a894554df4a0a471 --- devstack/plugin.sh | 20 +++++++++----------- devstack/settings | 1 + 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 4405989..deefe13 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -1,12 +1,11 @@ # plugin.sh - DevStack plugin.sh dispatch script app-catalog-ui -APP_CAT_UI_DIR=$(cd $(dirname $BASH_SOURCE)/.. && pwd) - function install_app-catalog-ui { - sudo pip install --upgrade ${APP_CAT_UI_DIR} - cp -a ${APP_CAT_UI_DIR}/app_catalog/static ${DEST}/horizon/ + setup_develop $APP_CAT_UI_DIR +} + +function configure_app-catalog-ui { cp -a ${APP_CAT_UI_DIR}/app_catalog/enabled/* ${DEST}/horizon/openstack_dashboard/enabled/ - python ${DEST}/horizon/manage.py compress --force } # check for service enabled @@ -19,13 +18,13 @@ if is_service_enabled app-catalog-ui; then elif [[ "$1" == "stack" && "$2" == "install" ]]; then # Perform installation of service source - # no-op - : + echo_summary "Installing App Catalog UI" + install_app-catalog-ui elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then # Configure after the other layer 1 and 2 services have been configured - echo_summary "Installing App Catalog UI" - install_app-catalog-ui + echo_summary "Configuring App Catalog UI" + configure_app-catalog-ui elif [[ "$1" == "stack" && "$2" == "extra" ]]; then # Initialize and start the app-catalog-ui service @@ -42,7 +41,6 @@ if is_service_enabled app-catalog-ui; then if [[ "$1" == "clean" ]]; then # Remove state and transient data # Remember clean.sh first calls unstack.sh - # no-op - : + rm -f ${DEST}/horizon/openstack_dashboard/enabled/*_catalog_panel*.py* fi fi diff --git a/devstack/settings b/devstack/settings index 88bcc94..cfa2b86 100644 --- a/devstack/settings +++ b/devstack/settings @@ -1,2 +1,3 @@ # settings file for app-catalog-ui plugin +APP_CAT_UI_DIR=$DEST/app-catalog-ui enable_service app-catalog-ui