From 9a44941c6696411a35f29157f0582b0b830ceb6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Fran=C3=A7oise?= Date: Mon, 29 Feb 2016 16:27:09 +0100 Subject: [PATCH] Documentation on purge command This patchset add a new entry for the purge into the Watcher documentation. Change-Id: Ifb74b379bccd59ff736bf186bdaaf74de77098f1 Implements: blueprint db-purge-engine --- doc/source/man/watcher-db-manage.rst | 41 +++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/doc/source/man/watcher-db-manage.rst b/doc/source/man/watcher-db-manage.rst index ec6706a13..a7b933d94 100644 --- a/doc/source/man/watcher-db-manage.rst +++ b/doc/source/man/watcher-db-manage.rst @@ -52,7 +52,7 @@ run the following:: Show the program's version number and exit. -.. option:: upgrade, downgrade, stamp, revision, version, create_schema +.. option:: upgrade, downgrade, stamp, revision, version, create_schema, purge The :ref:`command ` to run. @@ -219,3 +219,42 @@ version Show help for version and exit. This command will output the current database version. + +purge +----- + +.. program:: purge + +.. option:: -h, --help + + Show help for purge and exit. + +.. option:: -d, --age-in-days + + The number of days (starting from today) before which we consider soft + deleted objects as expired and should hence be erased. By default, all + objects soft deleted are considered expired. This can be useful as removing + a significant amount of objects may cause a performance issues. + +.. option:: -n, --max-number + + The maximum number of database objects we expect to be deleted. If exceeded, + this will prevent any deletion. + +.. option:: -t, --audit-template + + Either the UUID or name of the soft deleted audit template to purge. This + will also include any related objects with it. + +.. option:: -e, --exclude-orphans + + This is a flag to indicate when we want to exclude orphan objects from + deletion. + +.. option:: --dry-run + + This is a flag to indicate when we want to perform a dry run. This will show + the objects that would be deleted instead of actually deleting them. + +This command will purge the current database by removing both its soft deleted +and orphan objects.