diff --git a/lib/quantum b/lib/quantum index 61b89f7b0e..9ad15386f1 100644 --- a/lib/quantum +++ b/lib/quantum @@ -179,7 +179,7 @@ source $TOP_DIR/lib/quantum_plugins/$Q_PLUGIN # Agent loadbalancer service plugin functions # ------------------------------------------- # 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 if has_quantum_plugin_security_group; then diff --git a/lib/quantum_plugins/agent_loadbalancer b/lib/quantum_plugins/services/agent_loadbalancer similarity index 60% rename from lib/quantum_plugins/agent_loadbalancer rename to lib/quantum_plugins/services/agent_loadbalancer index 87e7aaaf36..b6528b0e84 100644 --- a/lib/quantum_plugins/agent_loadbalancer +++ b/lib/quantum_plugins/services/agent_loadbalancer @@ -7,6 +7,7 @@ set +o xtrace 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() { if is_ubuntu || is_fedora; then @@ -19,9 +20,9 @@ function quantum_agent_lbaas_install_agent_packages() { function quantum_agent_lbaas_configure_common() { 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 - 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 } @@ -31,13 +32,9 @@ function quantum_agent_lbaas_configure_agent() { 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 - 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 + quantum_plugin_setup_interface_driver $LBAAS_AGENT_CONF_FILENAME if is_fedora; then iniset $LBAAS_AGENT_CONF_FILENAME DEFAULT user_group "nobody"