Allow a plugin specific interface_driver config in q-lbaas
Previously interface_driver for q-lbaas is hardcoded and q-lbaas does not work when quantum plugin requires additional configuration (like ovs_use_veth=True). This commit set up interface_driver using quantum_plugin_setup_interface_driver function. This commit also moves a script related Quantum service plugin to lib/quantum_plugins/services/ Change-Id: Iad11c1b31071dfb580843be18be78c83feb91f10
This commit is contained in:
parent
9cb8e57482
commit
c07112a203
@ -179,7 +179,7 @@ source $TOP_DIR/lib/quantum_plugins/$Q_PLUGIN
|
|||||||
# Agent loadbalancer service plugin functions
|
# Agent loadbalancer service plugin functions
|
||||||
# -------------------------------------------
|
# -------------------------------------------
|
||||||
# Hardcoding for 1 service plugin for now
|
# Hardcoding for 1 service plugin for now
|
||||||
source $TOP_DIR/lib/quantum_plugins/agent_loadbalancer
|
source $TOP_DIR/lib/quantum_plugins/services/agent_loadbalancer
|
||||||
|
|
||||||
# Use security group or not
|
# Use security group or not
|
||||||
if has_quantum_plugin_security_group; then
|
if has_quantum_plugin_security_group; then
|
||||||
|
@ -7,6 +7,7 @@ set +o xtrace
|
|||||||
|
|
||||||
|
|
||||||
AGENT_LBAAS_BINARY="$QUANTUM_DIR/bin/quantum-lbaas-agent"
|
AGENT_LBAAS_BINARY="$QUANTUM_DIR/bin/quantum-lbaas-agent"
|
||||||
|
AGENT_LBAAS_PLUGIN=quantum.plugins.services.agent_loadbalancer.plugin.LoadBalancerPlugin
|
||||||
|
|
||||||
function quantum_agent_lbaas_install_agent_packages() {
|
function quantum_agent_lbaas_install_agent_packages() {
|
||||||
if is_ubuntu || is_fedora; then
|
if is_ubuntu || is_fedora; then
|
||||||
@ -19,9 +20,9 @@ function quantum_agent_lbaas_install_agent_packages() {
|
|||||||
|
|
||||||
function quantum_agent_lbaas_configure_common() {
|
function quantum_agent_lbaas_configure_common() {
|
||||||
if [[ $Q_SERVICE_PLUGIN_CLASSES == '' ]]; then
|
if [[ $Q_SERVICE_PLUGIN_CLASSES == '' ]]; then
|
||||||
Q_SERVICE_PLUGIN_CLASSES="quantum.plugins.services.agent_loadbalancer.plugin.LoadBalancerPlugin"
|
Q_SERVICE_PLUGIN_CLASSES=$AGENT_LBAAS_PLUGIN
|
||||||
else
|
else
|
||||||
Q_SERVICE_PLUGIN_CLASSES="$Q_SERVICE_PLUGIN_CLASSES,quantum.plugins.services.agent_loadbalancer.plugin.LoadBalancerPlugin"
|
Q_SERVICE_PLUGIN_CLASSES="$Q_SERVICE_PLUGIN_CLASSES,$AGENT_LBAAS_PLUGIN"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,13 +32,9 @@ function quantum_agent_lbaas_configure_agent() {
|
|||||||
|
|
||||||
LBAAS_AGENT_CONF_FILENAME="$LBAAS_AGENT_CONF_PATH/lbaas_agent.ini"
|
LBAAS_AGENT_CONF_FILENAME="$LBAAS_AGENT_CONF_PATH/lbaas_agent.ini"
|
||||||
|
|
||||||
cp $QUANTUM_DIR/etc/lbaas_agent.ini /$LBAAS_AGENT_CONF_FILENAME
|
cp $QUANTUM_DIR/etc/lbaas_agent.ini $LBAAS_AGENT_CONF_FILENAME
|
||||||
|
|
||||||
if [[ $Q_PLUGIN == 'linuxbridge' || $Q_PLUGIN == 'brocade' ]]; then
|
quantum_plugin_setup_interface_driver $LBAAS_AGENT_CONF_FILENAME
|
||||||
iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT interface_driver "quantum.agent.linux.interface.BridgeInterfaceDriver"
|
|
||||||
else
|
|
||||||
iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT interface_driver "quantum.agent.linux.interface.OVSInterfaceDriver"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if is_fedora; then
|
if is_fedora; then
|
||||||
iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT user_group "nobody"
|
iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT user_group "nobody"
|
Loading…
x
Reference in New Issue
Block a user