cleanUp() removing all test resources as an admin

Add a parameter in tempest.conf "full_clean_stack" to
allow/prevent the use of cleanup() method at the end
of a stress test run.

This is mandatory to use stress tests in a multi-user
environment since the actual cleanup() is designed to
remove every object of every tenant (and thus will
impact other users on the same openstack)

Change-Id: I42dc9592617aeeca9660f670940ecbf50b6108ab
Closes-Bug: #1273254
This commit is contained in:
Julien Leloup 2014-02-13 14:29:02 +01:00
parent 209827826b
commit a5ee542bc0
3 changed files with 12 additions and 2 deletions

View File

@ -757,6 +757,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]

View File

@ -591,7 +591,12 @@ StressGroup = [
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.')
]

View File

@ -220,7 +220,7 @@ def stress_openstack(tests, duration, max_runs=None, stop_on_error=False):
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: