Audit API supports new force option
Depends-on:Ia08694d2fb76907ea14e64116af2e722fe930063 Change-Id: Ib2d221ea9c994dea396c54cc8d2d32237025a1d4 Implements: blueprint add-force-field-to-audit
This commit is contained in:
@@ -121,7 +121,10 @@ class AuditHandler(BaseAuditHandler):
|
||||
|
||||
def pre_execute(self, audit, request_context):
|
||||
LOG.debug("Trigger audit %s", audit.uuid)
|
||||
self.check_ongoing_action_plans(request_context)
|
||||
# If audit.force is true, audit will be executed
|
||||
# despite of ongoing actionplan
|
||||
if not audit.force:
|
||||
self.check_ongoing_action_plans(request_context)
|
||||
# Write hostname that will execute this audit.
|
||||
audit.hostname = CONF.host
|
||||
# change state of the audit to ONGOING
|
||||
|
||||
Reference in New Issue
Block a user