watcher.objects.audit_template Module¶An Audit may be launched several times with the same settings (Goal, thresholds, …). Therefore it makes sense to save those settings in some sort of Audit preset object, which is known as an Audit Template.
An Audit Template contains at least the Goal of the Audit.
It may also contain some error handling settings indicating whether:
and how many retries should be attempted before failure occurs (also the latter can be complex: for example the scenario in which there are many first-time failures on ultimately successful Actions).
Moreover, an Audit Template may contain some settings related to the level of automation for the Action Plan that will be generated by the Audit. A flag will indicate whether the Action Plan will be launched automatically or will need a manual confirmation from the Administrator.
Last but not least, an Audit Template may contain a list of extra parameters related to the Strategy configuration. These parameters can be provided as a list of key-value pairs.
watcher.objects.audit_template.AuditTemplate(context=None, **kwargs)[source]¶Bases: watcher.objects.base.WatcherPersistentObject, watcher.objects.base.WatcherObject, watcher.objects.base.WatcherObjectDictCompat
create(*args, **kwargs)[source]¶Create a AuditTemplate record in the DB
| Returns: | An AuditTemplate object. |
|---|
destroy()[source]¶Delete the AuditTemplate from the DB
get(context, *args, **kwargs)[source]¶Find an audit template based on its id or uuid
| Parameters: |
|
|---|---|
| Returns: | a |
get_by_id(context, *args, **kwargs)[source]¶Find an audit template based on its integer id
| Parameters: |
|
|---|---|
| Returns: | a |
get_by_name(context, *args, **kwargs)[source]¶Find an audit template based on name
| Parameters: |
|
|---|---|
| Returns: | a |
get_by_uuid(context, *args, **kwargs)[source]¶Find an audit template based on uuid
| Parameters: |
|
|---|---|
| Returns: | a |
list(context, *args, **kwargs)[source]¶Return a list of AuditTemplate objects.
| Parameters: |
|
|---|---|
| Returns: | a list of |
refresh(*args, **kwargs)[source]¶Loads updates for this AuditTemplate.
Loads a audit_template with the same uuid from the database and checks for updated attributes. Updates are applied from the loaded audit_template column by column, if there are any updates. :param eager: Load object fields if True (Default: False)
save(*args, **kwargs)[source]¶Save updates to this AuditTemplate.
Updates will be made column by column based on the result of self.what_changed().
soft_delete(*args, **kwargs)[source]¶Soft Delete the AuditTemplate from the DB
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.