Browse code

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 <jhershbe@redhat.com>

Josh authored on 2018/02/01 16:45:47
Showing 1 changed files
... ...
@@ -42,6 +42,7 @@ NEUTRON_META_CONF=$NEUTRON_CONF_DIR/metadata_agent.ini
42 42
 NEUTRON_DHCP_CONF=$NEUTRON_CONF_DIR/dhcp_agent.ini
43 43
 NEUTRON_L3_CONF=$NEUTRON_CONF_DIR/l3_agent.ini
44 44
 NEUTRON_AGENT_CONF=$NEUTRON_CONF_DIR/
45
+NEUTRON_CREATE_INITIAL_NETWORKS=${NEUTRON_CREATE_INITIAL_NETWORKS:-True}
45 46
 
46 47
 NEUTRON_STATE_PATH=${NEUTRON_STATE_PATH:=$DATA_DIR/neutron}
47 48
 NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
... ...
@@ -438,7 +439,7 @@ function start_neutron_new {
438 438
     if is_service_enabled neutron-l3; then
439 439
         run_process neutron-l3 "$NEUTRON_BIN_DIR/$NEUTRON_L3_BINARY --config-file $NEUTRON_CONF --config-file $NEUTRON_L3_CONF"
440 440
     fi
441
-    if is_service_enabled neutron-api; then
441
+    if is_service_enabled neutron-api && [[ "$NEUTRON_CREATE_INITIAL_NETWORKS" == "True" ]]; then
442 442
         # XXX(sc68cal) - Here's where plugins can wire up their own networks instead
443 443
         # of the code in lib/neutron_plugins/services/l3
444 444
         if type -p neutron_plugin_create_initial_networks > /dev/null; then