Add variable to specify additional parameters for the Neutron service.
This patch adds a new variable, Q_SRV_EXTRA_DEFAULT_OPTS, which can
override any parameter of the [DEFAULT] section of the neutron.conf
file. It can be used for example to define the number of DHCP agents
that should host a network:
Q_SRV_EXTRA_DEFAULT_OPTS=(dhcp_agents_per_network=2)
Change-Id: Ic34164457e64dec6ca8ec76be1772f998d100991
diff --git a/lib/neutron b/lib/neutron
index c28bd28..5da7cfc 100644
--- a/lib/neutron
+++ b/lib/neutron
@@ -614,6 +614,14 @@
iniset $NEUTRON_CONF DEFAULT auth_strategy $Q_AUTH_STRATEGY
_neutron_setup_keystone $NEUTRON_CONF keystone_authtoken
+ # Define extra "DEFAULT" configuration options when q-svc is configured by
+ # defining the array ``Q_SRV_EXTRA_DEFAULT_OPTS``.
+ # For Example: ``Q_SRV_EXTRA_DEFAULT_OPTS=(foo=true bar=2)``
+ for I in "${Q_SRV_EXTRA_DEFAULT_OPTS[@]}"; do
+ # Replace the first '=' with ' ' for iniset syntax
+ iniset $NEUTRON_CONF DEFAULT ${I/=/ }
+ done
+
# Configure plugin
neutron_plugin_configure_service
}