Passing config for flat type network
Add support to passing the flat_network configuration. User can
either passing the physical network name, or use the physical
network definition
Change-Id: Ie42679f207eb14620883778314f74abf378b5cbc
diff --git a/lib/neutron_plugins/ml2 b/lib/neutron_plugins/ml2
index 44b947f..f9a9774 100644
--- a/lib/neutron_plugins/ml2
+++ b/lib/neutron_plugins/ml2
@@ -84,6 +84,11 @@
fi
fi
+
+ # Allow for setup the flat type network
+ if [[ -z "$Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS" && -n "$PHYSICAL_NETWORK" ]]; then
+ Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS="flat_networks=$Q_ML2_FLAT_PHYSNET_OPTIONS"
+ fi
# REVISIT(rkukura): Setting firewall_driver here for
# neutron.agent.securitygroups_rpc.is_firewall_enabled() which is
# used in the server, in case no L2 agent is configured on the
@@ -110,6 +115,8 @@
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_type_vxlan $Q_ML2_PLUGIN_VXLAN_TYPE_OPTIONS
+ populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_type_flat $Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS
+
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_type_vlan $Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS
if [[ "$Q_DVR_MODE" != "legacy" ]]; then