Added purge script for soft deleted objects
This patchset implements the purge script as specified in its related blueprint: - The '--age-in-days' option allows to specify the number of days before expiry - The '--max-number' option allows us to specify a limit on the number of objects to delete - The '--audit-template' option allows you to only delete objects related to the specified audit template UUID or name - The '--dry-run' option to go through the purge procedure without actually deleting anything - The '--exclude-orphans' option which allows you to exclude from the purge any object that does not have a parent (i.e. and audit without a related audit template) A prompt has been added to also propose to narrow down the number of deletions to be below the specified limit. Change-Id: I3ce83ab95277c109df67a6b5b920a878f6e59d3f Implements: blueprint db-purge-engine
This commit is contained in:
@@ -283,3 +283,11 @@ class LoadingError(WatcherException):
|
||||
|
||||
class ReservedWord(WatcherException):
|
||||
msg_fmt = _("The identifier '%(name)s' is a reserved word")
|
||||
|
||||
|
||||
class NotSoftDeletedStateError(WatcherException):
|
||||
msg_fmt = _("The %(name)s resource %(id)s is not soft deleted")
|
||||
|
||||
|
||||
class NegativeLimitError(WatcherException):
|
||||
msg_fmt = _("Limit should be positive")
|
||||
|
||||
Reference in New Issue
Block a user