Merge "cleanUp() removing all test resources as an admin"
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index 025d0f3..771c84b 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -770,6 +770,11 @@
 # value)
 #leave_dirty_stack=false
 
+# Allows a full cleaning process after a stress test. Caution
+# : this cleanup will remove every objects of every tenant.
+# (boolean value)
+#full_clean_stack=false
+
 
 [telemetry]
 
diff --git a/tempest/config.py b/tempest/config.py
index 210c857..5f73b25 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -606,7 +606,12 @@
                 default=False,
                 help='Prevent the cleaning (tearDownClass()) between'
                      ' each stress test run if an exception occurs'
-                     ' during this run.')
+                     ' during this run.'),
+    cfg.BoolOpt('full_clean_stack',
+                default=False,
+                help='Allows a full cleaning process after a stress test.'
+                     ' Caution : this cleanup will remove every objects of'
+                     ' every tenant.')
 ]
 
 
diff --git a/tempest/stress/driver.py b/tempest/stress/driver.py
index d4689c4..3715636 100644
--- a/tempest/stress/driver.py
+++ b/tempest/stress/driver.py
@@ -220,7 +220,7 @@
     LOG.info("Run %d actions (%d failed)" %
              (sum_runs, sum_fails))
 
-    if not had_errors:
+    if not had_errors and CONF.stress.full_clean_stack:
         LOG.info("cleaning up")
         cleanup.cleanup()
     if had_errors: