Merge "Neutron: Define a utility function to add neutron service class"
This commit is contained in:
commit
15d2526db9
10
lib/neutron
10
lib/neutron
@ -757,6 +757,16 @@ function _configure_neutron_service() {
|
||||
# Utility Functions
|
||||
#------------------
|
||||
|
||||
# _neutron_service_plugin_class_add() - add service plugin class
|
||||
function _neutron_service_plugin_class_add() {
|
||||
local service_plugin_class=$1
|
||||
if [[ $Q_SERVICE_PLUGIN_CLASSES == '' ]]; then
|
||||
Q_SERVICE_PLUGIN_CLASSES=$service_plugin_class
|
||||
elif [[ ! ,${Q_SERVICE_PLUGIN_CLASSES}, =~ ,${service_plugin_class}, ]]; then
|
||||
Q_SERVICE_PLUGIN_CLASSES="$Q_SERVICE_PLUGIN_CLASSES,$service_plugin_class"
|
||||
fi
|
||||
}
|
||||
|
||||
# _neutron_setup_rootwrap() - configure Neutron's rootwrap
|
||||
function _neutron_setup_rootwrap() {
|
||||
if [[ "$Q_USE_ROOTWRAP" == "False" ]]; then
|
||||
|
@ -54,11 +54,7 @@ function neutron_plugin_configure_common() {
|
||||
Q_PLUGIN_CLASS="neutron.plugins.ml2.plugin.Ml2Plugin"
|
||||
# The ML2 plugin delegates L3 routing/NAT functionality to
|
||||
# the L3 service plugin which must therefore be specified.
|
||||
if [[ $Q_SERVICE_PLUGIN_CLASSES == '' ]]; then
|
||||
Q_SERVICE_PLUGIN_CLASSES=$ML2_L3_PLUGIN
|
||||
else
|
||||
Q_SERVICE_PLUGIN_CLASSES="$Q_SERVICE_PLUGIN_CLASSES,$ML2_L3_PLUGIN"
|
||||
fi
|
||||
_neutron_service_plugin_class_add $ML2_L3_PLUGIN
|
||||
}
|
||||
|
||||
function neutron_plugin_configure_service() {
|
||||
|
@ -8,11 +8,7 @@ set +o xtrace
|
||||
FWAAS_PLUGIN=neutron.services.firewall.fwaas_plugin.FirewallPlugin
|
||||
|
||||
function neutron_fwaas_configure_common() {
|
||||
if [[ $Q_SERVICE_PLUGIN_CLASSES == '' ]]; then
|
||||
Q_SERVICE_PLUGIN_CLASSES=$FWAAS_PLUGIN
|
||||
else
|
||||
Q_SERVICE_PLUGIN_CLASSES="$Q_SERVICE_PLUGIN_CLASSES,$FWAAS_PLUGIN"
|
||||
fi
|
||||
_neutron_service_plugin_class_add $FWAAS_PLUGIN
|
||||
}
|
||||
|
||||
function neutron_fwaas_configure_driver() {
|
||||
|
@ -19,11 +19,7 @@ function neutron_agent_lbaas_install_agent_packages() {
|
||||
}
|
||||
|
||||
function neutron_agent_lbaas_configure_common() {
|
||||
if [[ $Q_SERVICE_PLUGIN_CLASSES == '' ]]; then
|
||||
Q_SERVICE_PLUGIN_CLASSES=$LBAAS_PLUGIN
|
||||
else
|
||||
Q_SERVICE_PLUGIN_CLASSES="$Q_SERVICE_PLUGIN_CLASSES,$LBAAS_PLUGIN"
|
||||
fi
|
||||
_neutron_service_plugin_class_add $LBAAS_PLUGIN
|
||||
}
|
||||
|
||||
function neutron_agent_lbaas_configure_agent() {
|
||||
|
@ -10,11 +10,7 @@ AGENT_METERING_BINARY="$NEUTRON_BIN_DIR/neutron-metering-agent"
|
||||
METERING_PLUGIN="neutron.services.metering.metering_plugin.MeteringPlugin"
|
||||
|
||||
function neutron_agent_metering_configure_common() {
|
||||
if [[ $Q_SERVICE_PLUGIN_CLASSES == '' ]]; then
|
||||
Q_SERVICE_PLUGIN_CLASSES=$METERING_PLUGIN
|
||||
else
|
||||
Q_SERVICE_PLUGIN_CLASSES="$Q_SERVICE_PLUGIN_CLASSES,$METERING_PLUGIN"
|
||||
fi
|
||||
_neutron_service_plugin_class_add $METERING_PLUGIN
|
||||
}
|
||||
|
||||
function neutron_agent_metering_configure_agent() {
|
||||
|
@ -15,11 +15,7 @@ function neutron_vpn_install_agent_packages() {
|
||||
}
|
||||
|
||||
function neutron_vpn_configure_common() {
|
||||
if [[ $Q_SERVICE_PLUGIN_CLASSES == '' ]]; then
|
||||
Q_SERVICE_PLUGIN_CLASSES=$VPN_PLUGIN
|
||||
else
|
||||
Q_SERVICE_PLUGIN_CLASSES="$Q_SERVICE_PLUGIN_CLASSES,$VPN_PLUGIN"
|
||||
fi
|
||||
_neutron_service_plugin_class_add $VPN_PLUGIN
|
||||
}
|
||||
|
||||
function neutron_vpn_stop() {
|
||||
|
Loading…
Reference in New Issue
Block a user