Add HA support
This patch set adds hostname field to Audit and Action Plan objects to track services which execute these objects. Change-Id: I786e419952925c380c969b12cc60f9a1004af96b Partially-Implements: blueprint support-watcher-ha-active-active-mode
This commit is contained in:
@@ -106,7 +106,8 @@ class ActionPlan(base.WatcherPersistentObject, base.WatcherObject,
|
||||
# Version 1.2: audit_id is not nullable anymore
|
||||
# Version 2.0: Removed 'first_action_id' object field
|
||||
# Version 2.1: Changed global_efficacy type
|
||||
VERSION = '2.1'
|
||||
# Version 2.2: Added 'hostname' field
|
||||
VERSION = '2.2'
|
||||
|
||||
dbapi = db_api.get_instance()
|
||||
|
||||
@@ -117,6 +118,7 @@ class ActionPlan(base.WatcherPersistentObject, base.WatcherObject,
|
||||
'strategy_id': wfields.IntegerField(),
|
||||
'state': wfields.StringField(nullable=True),
|
||||
'global_efficacy': wfields.FlexibleListOfDictField(nullable=True),
|
||||
'hostname': wfields.StringField(nullable=True),
|
||||
|
||||
'audit': wfields.ObjectField('Audit', nullable=True),
|
||||
'strategy': wfields.ObjectField('Strategy', nullable=True),
|
||||
|
||||
@@ -87,7 +87,8 @@ class Audit(base.WatcherPersistentObject, base.WatcherObject,
|
||||
# Version 1.3: Added 'next_run_time' DateTime field,
|
||||
# 'interval' type has been changed from Integer to String
|
||||
# Version 1.4: Added 'name' string field
|
||||
VERSION = '1.4'
|
||||
# Version 1.5: Added 'hostname' field
|
||||
VERSION = '1.5'
|
||||
|
||||
dbapi = db_api.get_instance()
|
||||
|
||||
@@ -105,6 +106,7 @@ class Audit(base.WatcherPersistentObject, base.WatcherObject,
|
||||
'auto_trigger': wfields.BooleanField(),
|
||||
'next_run_time': wfields.DateTimeField(nullable=True,
|
||||
tzinfo_aware=False),
|
||||
'hostname': wfields.StringField(nullable=True),
|
||||
|
||||
'goal': wfields.ObjectField('Goal', nullable=True),
|
||||
'strategy': wfields.ObjectField('Strategy', nullable=True),
|
||||
|
||||
Reference in New Issue
Block a user