Add auto_trigger support to watcher

This patch set adds support of auto-triggering of action plans.

Change-Id: I36b7dff8eab5f6ebb18f6f4e752cf4b263456293
Partially-Implements: blueprint automatic-triggering-audit
This commit is contained in:
Alexander Chadin
2016-11-28 17:00:44 +03:00
parent c5ff387ae9
commit d0bca1f2ab
13 changed files with 123 additions and 17 deletions

View File

@@ -85,6 +85,7 @@ class State(object):
SUCCEEDED = 'SUCCEEDED'
DELETED = 'DELETED'
CANCELLED = 'CANCELLED'
SUPERSEDED = 'SUPERSEDED'
@base.WatcherObjectRegistry.register

View File

@@ -79,7 +79,8 @@ class Audit(base.WatcherPersistentObject, base.WatcherObject,
# Version 1.0: Initial version
# Version 1.1: Added 'goal' and 'strategy' object field
VERSION = '1.1'
# Version 1.2 Added 'auto_trigger' boolean field
VERSION = '1.2'
dbapi = db_api.get_instance()
@@ -93,6 +94,7 @@ class Audit(base.WatcherPersistentObject, base.WatcherObject,
'scope': wfields.FlexibleListOfDictField(nullable=True),
'goal_id': wfields.IntegerField(),
'strategy_id': wfields.IntegerField(nullable=True),
'auto_trigger': wfields.BooleanField(),
'goal': wfields.ObjectField('Goal', nullable=True),
'strategy': wfields.ObjectField('Strategy', nullable=True),