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.
Bases: watcher.objects.base.WatcherObject
Create a AuditTemplate record in the DB.
Parameters: | context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: AuditTemplate(context) |
---|
Delete the AuditTemplate from the DB.
Parameters: | context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: AuditTemplate(context) |
---|
Find an audit template based on its id or uuid
Parameters: |
|
---|---|
Returns: | a AuditTemplate object. |
Find an audit template based on its integer id
Parameters: |
|
---|---|
Returns: | a AuditTemplate object. |
Find an audit template based on name
Parameters: |
|
---|---|
Returns: | a AuditTemplate object. |
Find an audit template based on uuid
Parameters: |
|
---|---|
Returns: | a AuditTemplate object. |
Return a list of AuditTemplate objects.
Parameters: |
|
---|---|
Returns: | a list of AuditTemplate object. |
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.
Parameters: | context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: AuditTemplate(context) |
---|
Save updates to this AuditTemplate.
Updates will be made column by column based on the result of self.what_changed().
Parameters: | context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: AuditTemplate(context) |
---|
soft Delete the AuditTemplate from the DB.
Parameters: | context – Security context. NOTE: This should only be used internally by the indirection_api. Unfortunately, RPC requires context as the first argument, even though we don’t use it. A context should be set when instantiating the object, e.g.: AuditTemplate(context) |
---|