Description: Add delay in subnet teardown
 This is a hack, and should be fixed in a better way...
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2022-01-10

--- tempest-29.0.0.orig/tempest/lib/services/network/subnets_client.py
+++ tempest-29.0.0/tempest/lib/services/network/subnets_client.py
@@ -10,6 +10,8 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import time
+
 from tempest.lib.services.network import base
 
 
@@ -48,6 +50,9 @@ class SubnetsClient(base.BaseNetworkClie
         return self.show_resource(uri, **fields)
 
     def delete_subnet(self, subnet_id):
+        # This avoids failures when it takes time to teardown some ports
+        # and deleting a subnet happens too early.
+        time.sleep(10)
         uri = '/subnets/%s' % subnet_id
         return self.delete_resource(uri)
 
