From 73b21910123704ac64ca3d2ba7f50e90e248d7ea Mon Sep 17 00:00:00 2001 From: Kyle Mestery Date: Thu, 22 Aug 2013 11:25:21 +0000 Subject: [PATCH] Add support for setting Neutron DHCP agent options. This patch adds support for setting arbitrary Neutron DHCP agent options. An example of using it would be to add this to your localrc: Q_DHCP_EXTRA_DEFAULT_OPTS=(enable_multihost=True) Change-Id: I56d267eafa06c52c3867e3396483f5fde3ee5570 --- lib/neutron | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/neutron b/lib/neutron index 31876dee88..3ab6a4cde9 100644 --- a/lib/neutron +++ b/lib/neutron @@ -541,6 +541,14 @@ function _configure_neutron_dhcp_agent() { iniset $Q_DHCP_CONF_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE iniset $Q_DHCP_CONF_FILE DEFAULT root_helper "$Q_RR_COMMAND" + # Define extra "DEFAULT" configuration options when q-dhcp is configured by + # defining the array ``Q_DHCP_EXTRA_DEFAULT_OPTS``. + # For Example: ``Q_DHCP_EXTRA_DEFAULT_OPTS=(foo=true bar=2)`` + for I in "${Q_DHCP_EXTRA_DEFAULT_OPTS[@]}"; do + # Replace the first '=' with ' ' for iniset syntax + iniset $Q_DHCP_CONF_FILE DEFAULT ${I/=/ } + done + _neutron_setup_interface_driver $Q_DHCP_CONF_FILE neutron_plugin_configure_dhcp_agent