Allow LBaaS service provider to be configurable in devstack

Define the NEUTRON_LBAAS_SERVICE_PROVIDER environment variable that
allows the service provider to be defined in the localrc when using
devstack.  Also, use the agent driver as the default.

Change-Id: I8e8ce74eb0847f027209e451d2589db6272ed6d6
Depends-On: Icf34a215e094d27270a5f64df2d1cb995f505370
Depends-On: I51e13a4555e777438af048dd580eacc592435296
This commit is contained in:
Al Miller 2015-03-02 19:35:20 -08:00
parent 69cad42bd6
commit 992697e910
2 changed files with 10 additions and 5 deletions

View File

@ -18,10 +18,12 @@ function neutron_lbaas_configure_common {
cp $NEUTRON_LBAAS_DIR/etc/neutron_lbaas.conf $NEUTRON_LBAAS_CONF
if is_service_enabled $LBAAS_V2; then
if is_service_enabled $LBAAS_V1; then
inicomment $NEUTRON_LBAAS_CONF service_providers service_provider
iniadd $NEUTRON_LBAAS_CONF service_providers service_provider\
"LOADBALANCERV2:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.synchronous_namespace_driver.HaproxyNSDriver:default"
iniadd $NEUTRON_LBAAS_CONF service_providers service_provider $NEUTRON_LBAAS_SERVICE_PROVIDERV1
elif is_service_enabled $LBAAS_V2; then
inicomment $NEUTRON_LBAAS_CONF service_providers service_provider
iniadd $NEUTRON_LBAAS_CONF service_providers service_provider $NEUTRON_LBAAS_SERVICE_PROVIDERV2
fi
if is_service_enabled $LBAAS_V1; then

View File

@ -12,8 +12,11 @@ LBAAS_ANY="$LBAAS_V1 $LBAAS_V2"
LBAAS_AGENT_CONF_PATH=/etc/neutron/services/loadbalancer/haproxy
LBAAS_AGENT_CONF_FILENAME=$LBAAS_AGENT_CONF_PATH/lbaas_agent.ini
LBAASV1_PLUGIN=neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPlugin
LBAASV2_PLUGIN=neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2
LBAASV1_PLUGIN=${LBAASV1_PLUGIN:-"neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPlugin"}
LBAASV2_PLUGIN=${LBAASV2_PLUGIN:-"neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2"}
NEUTRON_LBAAS_DIR=$DEST/neutron-lbaas
NEUTRON_LBAAS_CONF=$NEUTRON_CONF_DIR/neutron_lbaas.conf
NEUTRON_LBAAS_SERVICE_PROVIDERV1=${NEUTRON_LBAAS_SERVICE_PROVIDERV1:-"LOADBALANCER:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default"}
NEUTRON_LBAAS_SERVICE_PROVIDERV2=${NEUTRON_LBAAS_SERVICE_PROVIDERV2:-"LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default"}