devstack/lib/savanna-dashboard
Adam Spiers 6a5aa7c6a2 Fix some Markdown formatting issues
Address miscellaneous issues with Markdown formatting in comments which
are consumed by shocco when generating the online documentation.

Change-Id: I953075cdbddbf1f119c6c7e35f039e2e54b79078
2013-10-24 17:38:19 +01:00

72 lines
2.0 KiB
Plaintext

# lib/savanna-dashboard
# Dependencies:
#
# - ``functions`` file
# - ``DEST``, ``DATA_DIR``, ``STACK_USER`` must be defined
# - ``SERVICE_HOST``
# ``stack.sh`` calls the entry points in this order:
#
# - install_savanna_dashboard
# - configure_savanna_dashboard
# - cleanup_savanna_dashboard
# Save trace setting
XTRACE=$(set +o | grep xtrace)
set +o xtrace
source $TOP_DIR/lib/horizon
# Defaults
# --------
# Set up default repos
SAVANNA_DASHBOARD_REPO=${SAVANNA_DASHBOARD_REPO:-${GIT_BASE}/openstack/savanna-dashboard.git}
SAVANNA_DASHBOARD_BRANCH=${SAVANNA_DASHBOARD_BRANCH:-master}
SAVANNA_PYTHONCLIENT_REPO=${SAVANNA_PYTHONCLIENT_REPO:-${GIT_BASE}/openstack/python-savannaclient.git}
SAVANNA_PYTHONCLIENT_BRANCH=${SAVANNA_PYTHONCLIENT_BRANCH:-master}
# Set up default directories
SAVANNA_DASHBOARD_DIR=$DEST/savanna_dashboard
SAVANNA_PYTHONCLIENT_DIR=$DEST/python-savannaclient
# Functions
# ---------
function configure_savanna_dashboard() {
echo -e "SAVANNA_URL = \"http://$SERVICE_HOST:8386/v1.1\"\nAUTO_ASSIGNMENT_ENABLED = False" >> $HORIZON_DIR/openstack_dashboard/local/local_settings.py
echo -e "HORIZON_CONFIG['dashboards'] += ('savanna',)\nINSTALLED_APPS += ('savannadashboard',)" >> $HORIZON_DIR/openstack_dashboard/settings.py
if is_service_enabled neutron; then
echo -e "SAVANNA_USE_NEUTRON = True" >> $HORIZON_DIR/openstack_dashboard/local/local_settings.py
fi
}
# install_savanna_dashboard() - Collect source and prepare
function install_savanna_dashboard() {
install_python_savannaclient
git_clone $SAVANNA_DASHBOARD_REPO $SAVANNA_DASHBOARD_DIR $SAVANNA_DASHBOARD_BRANCH
setup_develop $SAVANNA_DASHBOARD_DIR
}
function install_python_savannaclient() {
git_clone $SAVANNA_PYTHONCLIENT_REPO $SAVANNA_PYTHONCLIENT_DIR $SAVANNA_PYTHONCLIENT_BRANCH
setup_develop $SAVANNA_PYTHONCLIENT_DIR
}
# Cleanup file settings.py from Savanna
function cleanup_savanna_dashboard() {
sed -i '/savanna/d' $HORIZON_DIR/openstack_dashboard/settings.py
}
# Restore xtrace
$XTRACE
# Local variables:
# mode: shell-script
# End: