Post Tempest Run Cleanup Utility¶
Utility for cleaning up environment after Tempest test run
tempest cleanup [--help] [OPTIONS]
If run with no arguments,
tempest cleanup will query your OpenStack
deployment and build a list of resources to delete and destroy them. This list
will exclude the resources from
saved_state.json and will include the
configured admin account if the
--delete-tempest-conf-objects flag is
specified. By default the admin project is not deleted and the admin user
tempest.conf is never deleted.
If step 1 is skipped in the example below, the cleanup procedure may delete resources that existed in the cloud before the test run. This may cause an unwanted destruction of cloud resources, so use caution with this command.
$ tempest cleanup --init-saved-state $ # Actual running of Tempest tests $ tempest cleanup
--init-saved-state: Initializes the saved state of the OpenStack deployment and will output a
saved_state.jsonfile containing resources from your deployment that will be preserved from the cleanup command. This should be done prior to running Tempest tests.
--delete-tempest-conf-objects: If option is present, then the command will delete the admin project in addition to the resources associated with them on clean up. If option is not present, the command will delete the resources associated with the Tempest and alternate Tempest users and projects but will not delete the projects themselves.
--dry-run: Creates a report (
./dry_run.json) of the projects that will be cleaned up (in the
_projects_to_cleandictionary 1) and the global objects that will be removed (domains, flavors, images, roles, projects, and users). Once the cleanup command is executed (e.g. run without parameters), running it again with
--dry-runshould yield an empty report.
--help: Print the help text for the command and parameters.
dry_run.jsonlists the projects that
tempest cleanupwill loop through to delete child objects, but the command will, by default, not delete the projects themselves. This may differ from the
projectslist as you can clean the Tempest and alternate Tempest users and projects but they will not be deleted unless the
--delete-tempest-conf-objectsflag is used to force their deletion.
If during execution of
tempest cleanup NotImplemented exception
tempest cleanup won’t fail on that, it will be logged only.
NotImplemented errors are ignored because they are an outcome of some
extensions being disabled and
tempest cleanup is not checking their
availability as it tries to clean up as much as possible without any