Files
nfv/devstack/plugin.sh
Yi Wang 41a8e350f0 Updates to stx-nfv Devstack plugin
1. Refine nfv installation code to modify nfv config files
2. Add dependency resource-agents
3. Add code to start, stop annd clean up nfv services

Story: 2003163
Task: 23298

Change-Id: Ic1e95dbaae4b319dcc9b4b20dea82bfb56e09696
Signed-off-by: Yi Wang <yi.c.wang@intel.com>
2018-12-05 16:59:32 +08:00

50 lines
1.6 KiB
Bash

#!/bin/bash
# devstack/plugin.sh
# Triggers specific functions to install and configure stx-nfv
echo_summary "stx-nfv devstack plugin.sh called: $1/$2"
# check for service enabled
if is_service_enabled stx-nfv; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then
# Perform installation of service source
echo_summary "Installing stx-nfv"
if is_service_enabled nfv-vim || is_service_enabled nfv-vim-api || is_service_enabled nfv-vim-webserver; then
install_nfv
fi
if is_service_enabled guest-client; then
install_guest_client
fi
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
# Configure after the other layer 1 and 2 services have been configured
echo_summary "Configuring stx-nfv"
:
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
echo_summary "Starting stx-nfv"
if is_service_enabled nfv-vim || is_service_enabled nfv-vim-api || is_service_enabled nfv-vim-webserver; then
start_nfv
fi
fi
if [[ "$1" == "unstack" ]]; then
echo_summary "Shutdown stx-nfv"
if is_service_enabled nfv-vim || is_service_enabled nfv-vim-api || is_service_enabled nfv-vim-webserver; then
stop_nfv
fi
fi
if [[ "$1" == "clean" ]]; then
echo_summary "Clean stx-nfv"
if is_service_enabled nfv-vim || is_service_enabled nfv-vim-api || is_service_enabled nfv-vim-webserver; then
cleanup_nfv
fi
if is_service_enabled guest-client; then
cleanup_guest_client
fi
fi
fi