Post Tempest Run Cleanup Utility

Utility for cleaning up environment after Tempest run

Runtime Arguments

–init-saved-state: Before you can execute cleanup you must initialize the saved state by running it with the –init-saved-state flag (creating ./saved_state.json), which protects your deployment from cleanup deleting objects you want to keep. Typically you would run cleanup with –init-saved-state prior to a tempest run. If this is not the case saved_state.json must be edited, removing objects you want cleanup to delete.

–dry-run: Creates a report (dry_run.json) of the tenants that will be cleaned up (in the “_tenants_to_clean” array), and the global objects that will be removed (tenants, users, flavors and images). Once cleanup is executed in normal mode, running it again with –dry-run should yield an empty report.

NOTE: The _tenants_to_clean array in dry-run.json lists the tenants that cleanup will loop through and delete child objects, not delete the tenant itself. This may differ from the tenants array as you can clean the tempest and alternate tempest tenants but by default, cleanup deletes the objects in the tempest and alternate tempest tenants but does not delete those tenants unless the –delete-tempest-conf-objects flag is used to force their deletion.

Normal mode: running with no arguments, will query your deployment and build a list of objects to delete after filtering out the objects found in saved_state.json and based on the –delete-tempest-conf-objects flag.

By default the tempest and alternate tempest users and tenants are not deleted and the admin user specified in tempest.conf is never deleted.

Please run with –help to see full list of options.