From 8c4492a848ad5b917397bc25cbf6703653b8895c Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 1 Feb 2018 09:45:47 +0200 Subject: [PATCH] Restore NEUTRON_CREATE_INITIAL_NETWORKS flag Somehow this feature was lost in the transition from q-svc to neutron-api. This patch does not modify the default behavior but allows specifying the flag to false to prevent devstack from creating the public and private networks. Change-Id: I952672496d007552c0c4d83db0d0df9be50326fc Signed-off-by: Josh (cherry picked from commit 8f7216290aebdd07f2277a92ae1baab5418c087c) --- lib/neutron | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/neutron b/lib/neutron index 2a660ec8e1..d4f4d6bb63 100644 --- a/lib/neutron +++ b/lib/neutron @@ -42,6 +42,7 @@ NEUTRON_META_CONF=$NEUTRON_CONF_DIR/metadata_agent.ini NEUTRON_DHCP_CONF=$NEUTRON_CONF_DIR/dhcp_agent.ini NEUTRON_L3_CONF=$NEUTRON_CONF_DIR/l3_agent.ini NEUTRON_AGENT_CONF=$NEUTRON_CONF_DIR/ +NEUTRON_CREATE_INITIAL_NETWORKS=${NEUTRON_CREATE_INITIAL_NETWORKS:-True} NEUTRON_STATE_PATH=${NEUTRON_STATE_PATH:=$DATA_DIR/neutron} NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron} @@ -425,7 +426,7 @@ function start_neutron_new { if is_service_enabled neutron-l3; then run_process neutron-l3 "$NEUTRON_BIN_DIR/$NEUTRON_L3_BINARY --config-file $NEUTRON_CONF --config-file $NEUTRON_L3_CONF" fi - if is_service_enabled neutron-api; then + if is_service_enabled neutron-api && [[ "$NEUTRON_CREATE_INITIAL_NETWORKS" == "True" ]]; then # XXX(sc68cal) - Here's where plugins can wire up their own networks instead # of the code in lib/neutron_plugins/services/l3 if type -p neutron_plugin_create_initial_networks > /dev/null; then