Add small delay to setup internal ports after network create

Related-Prod: PRODX-53280
Change-Id: I2ae5caff3a14474a7f75f2a67cfc2508a19a24f2
diff --git a/neutron_tempest_plugin/api/admin/test_quotas.py b/neutron_tempest_plugin/api/admin/test_quotas.py
index eb47fa5..8d96695 100644
--- a/neutron_tempest_plugin/api/admin/test_quotas.py
+++ b/neutron_tempest_plugin/api/admin/test_quotas.py
@@ -12,6 +12,7 @@
 #    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 #    License for the specific language governing permissions and limitations
 #    under the License.
+import time
 
 from tempest.common import utils
 from tempest.lib import decorators
@@ -50,6 +51,8 @@
     def _create_network(self, project_id):
         network = self.create_network(client=self.admin_client,
                                       tenant_id=project_id)
+        # Give some time to setup internal ports
+        time.sleep(CONF.neutron_plugin_options.internal_port_setup_delay)
         self.addCleanup(self.admin_client.delete_network,
                         network['id'])
         return network
diff --git a/neutron_tempest_plugin/config.py b/neutron_tempest_plugin/config.py
index 3f8ccd5..016299b 100644
--- a/neutron_tempest_plugin/config.py
+++ b/neutron_tempest_plugin/config.py
@@ -151,6 +151,10 @@
     cfg.BoolOpt('bgp_schedule_speakers_to_agents',
                 default=False,
                 help='Schedule BGP speakers to agents explicitly.'),
+    cfg.IntOpt('internal_port_setup_delay',
+           default=5,
+           help='Number of seconds to wait after network create to '
+                'setup internal ports.'),
 ]
 
 # TODO(amuller): Redo configuration options registration as part of the planned