994d5b2e7a
A working directory in DevStack is not trove-dashboard directory, so the directory path must be specified by an absolute path. When I tested the devstack plugin for translation previously, it seems compiled message catalogs existed and I didn't notice it. Change-Id: Id5bab4aa627f06e023839290a1d3f46c09890bf8
53 lines
1.6 KiB
Bash
53 lines
1.6 KiB
Bash
# plugin.sh - DevStack plugin.sh dispatch script trove-dashboard
|
|
|
|
TROVE_DASHBOARD_DIR=$(cd $(dirname $BASH_SOURCE)/.. && pwd)
|
|
|
|
function install_trove_dashboard {
|
|
setup_develop ${TROVE_DASHBOARD_DIR}
|
|
}
|
|
|
|
function configure_trove_dashboard {
|
|
cp -a ${TROVE_DASHBOARD_DIR}/trove_dashboard/enabled/* ${DEST}/horizon/openstack_dashboard/local/enabled/
|
|
# NOTE: If locale directory does not exist, compilemessages will fail,
|
|
# so check for an existence of locale directory is required.
|
|
if [ -d ${TROVE_DASHBOARD_DIR}/trove_dashboard/locale ]; then
|
|
(cd ${TROVE_DASHBOARD_DIR}/trove_dashboard; DJANGO_SETTINGS_MODULE=openstack_dashboard.settings ../manage.py compilemessages)
|
|
fi
|
|
}
|
|
|
|
# check for service enabled
|
|
if is_service_enabled trove-dashboard; then
|
|
|
|
if [[ "$1" == "stack" && "$2" == "pre-install" ]]; then
|
|
# Set up system services
|
|
# no-op
|
|
:
|
|
|
|
elif [[ "$1" == "stack" && "$2" == "install" ]]; then
|
|
# Perform installation of service source
|
|
echo_summary "Installing Trove UI"
|
|
install_trove_dashboard
|
|
|
|
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
|
|
# Configure after the other layer 1 and 2 services have been configured
|
|
echo_summary "Configurng Trove UI"
|
|
configure_trove_dashboard
|
|
|
|
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
|
# no-op
|
|
:
|
|
fi
|
|
|
|
if [[ "$1" == "unstack" ]]; then
|
|
# no-op
|
|
:
|
|
fi
|
|
|
|
if [[ "$1" == "clean" ]]; then
|
|
# Remove state and transient data
|
|
# Remember clean.sh first calls unstack.sh
|
|
# no-op
|
|
:
|
|
fi
|
|
fi
|