octavia-dashboard/devstack/plugin.sh
Michael Johnson 1f0c90f3a8 Updating for octavia-dashboard
This patch updates the imported code to reflect octavia-dashboard.

More work is required to make this work with the Octavia v2 API.
This will be done in followup patches.

Change-Id: I7363105a53642d0003036cada21c5b0cc25efc1a
2017-06-22 16:20:27 +08:00

36 lines
1.1 KiB
Bash

function octavia_dashboard_install {
setup_develop $OCTAVIA_DASHBOARD_DIR
}
function octavia_dashboard_configure {
cp $OCTAVIA_DASHBOARD_ENABLE_FILE_PATH \
$HORIZON_DIR/openstack_dashboard/local/enabled/
}
if is_service_enabled horizon && is_service_enabled o-api; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then
# Perform installation of service source
echo_summary "Installing octavia-dashboard"
octavia_dashboard_install
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Configuring octavia-dashboard"
octavia_dashboard_configure
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# Initialize and start the Octavia dashboard service
echo_summary "Initializing octavia-dashboard"
fi
fi
if [[ "$1" == "unstack" ]]; then
# Shut down Octavia dashboard services
:
fi
if [[ "$1" == "clean" ]]; then
# Remove state and transient data
# Remember clean.sh first calls unstack.sh
# Remove octavia-dashboard enabled file and pyc
rm -f "$HORIZON_DIR"/openstack_dashboard/local/enabled/"$OCTAVIA_DASHBOARD_ENABLE_FILE_NAME"*
fi