From 89ee58523050443a38c284e8f0920dae152a901a Mon Sep 17 00:00:00 2001
From: Matt Riedemann <mriedem@us.ibm.com>
Date: Thu, 9 Jul 2015 13:25:04 -0700
Subject: [PATCH] neutron: add NOVA_ALLOW_DUPLICATE_NETWORKS config option

Nova commit 322cc9336fe6f6fe9b3f0da33c6b26a3e5ea9b0c added the
neutron.allow_duplicate_networks config option in Juno and it defaults
to False. The option was deprecated in Kilo with commit
4306d9190f49e7fadf88669d18effedabc880d3b and removed in Liberty with
commit b06867c581541ed325ddc5e5b5a2d53b1b0261ac so it's the default
behavior in Liberty.

To test it in the gate with Tempest, we need to be able to set it to
True in devstack-gate and update tempest.conf (since tempest is branchless
and we don't want to try to test duplicate networks against kilo/juno code).

We can remove the change to lib/tempest when it's removed from Tempest
after kilo-eol.

Depends-On: I05f81d86cde249c23be06d5804fadbf40fc4a7f3

Change-Id: Ifd075420f57c9b60746f4a6af6520c0ef04800db
---
 lib/tempest | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/tempest b/lib/tempest
index a84ade2a81..cb5711f7d8 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -30,6 +30,7 @@
 # - ``DEFAULT_INSTANCE_TYPE``
 # - ``DEFAULT_INSTANCE_USER``
 # - ``CINDER_ENABLED_BACKENDS``
+# - ``NOVA_ALLOW_DUPLICATE_NETWORKS``
 #
 # ``stack.sh`` calls the entry points in this order:
 #
@@ -380,6 +381,10 @@ function configure_tempest {
     # TODO(gilliard): Remove the live_migrate_paused_instances flag when Juno is end of life.
     iniset $TEMPEST_CONFIG compute-feature-enabled live_migrate_paused_instances True
     iniset $TEMPEST_CONFIG compute-feature-enabled attach_encrypted_volume ${ATTACH_ENCRYPTED_VOLUME_AVAILABLE:-True}
+    # TODO(mriedem): Remove this when kilo-eol happens since the
+    # neutron.allow_duplicate_networks option was removed from nova in Liberty
+    # and is now the default behavior.
+    iniset $TEMPEST_CONFIG compute-feature-enabled allow_duplicate_networks ${NOVA_ALLOW_DUPLICATE_NETWORKS:-True}
 
     # Network
     iniset $TEMPEST_CONFIG network api_version 2.0