From 7bce8fa3171801db9bf2261b65b1f5b8978bb46e Mon Sep 17 00:00:00 2001 From: Edgar Magana Date: Tue, 4 Nov 2014 17:32:54 +0100 Subject: [PATCH] Includes a validation to disable creating initial networks for Neutron Neutron external and internal networks are created by default This commit let developers by configuration to decide if those networks needs to be created. This is needed to test Neutron DVR in a distributed Multi-node environment Change-Id: I17d891d072f189925676b4557094cde1c7a71579 Closes-Bug: 1389288 --- lib/neutron | 2 ++ stack.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/neutron b/lib/neutron index eb07f402d0..a3f9192869 100644 --- a/lib/neutron +++ b/lib/neutron @@ -131,6 +131,8 @@ Q_NOTIFY_NOVA_PORT_STATUS_CHANGES=${Q_NOTIFY_NOVA_PORT_STATUS_CHANGES:-True} Q_NOTIFY_NOVA_PORT_DATA_CHANGES=${Q_NOTIFY_NOVA_PORT_DATA_CHANGES:-True} VIF_PLUGGING_IS_FATAL=${VIF_PLUGGING_IS_FATAL:-True} VIF_PLUGGING_TIMEOUT=${VIF_PLUGGING_TIMEOUT:-300} +# Specify if the initial private and external networks should be created +NEUTRON_CREATE_INITIAL_NETWORKS=${NEUTRON_CREATE_INITIAL_NETWORKS:-True} ## Provider Network Information PROVIDER_SUBNET_NAME=${PROVIDER_SUBNET_NAME:-"provider_net"} diff --git a/stack.sh b/stack.sh index ec13338948..ed6a4e3936 100755 --- a/stack.sh +++ b/stack.sh @@ -1275,7 +1275,7 @@ if is_service_enabled neutron; then start_neutron_agents fi # Once neutron agents are started setup initial network elements -if is_service_enabled q-svc; then +if is_service_enabled q-svc && [[ "$NEUTRON_CREATE_INITIAL_NETWORKS" == "True" ]]; then echo_summary "Creating initial neutron network elements" create_neutron_initial_network setup_neutron_debug