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:
@@ -230,6 +230,9 @@ class ActionPlan(base.APIBase):
|
||||
links = wsme.wsattr([link.Link], readonly=True)
|
||||
"""A list containing a self link and associated action links"""
|
||||
|
||||
hostname = wsme.wsattr(wtypes.text, mandatory=False)
|
||||
"""Hostname the actionplan is running on"""
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super(ActionPlan, self).__init__()
|
||||
self.fields = []
|
||||
|
||||
@@ -77,6 +77,8 @@ class AuditPostType(wtypes.Base):
|
||||
|
||||
auto_trigger = wtypes.wsattr(bool, mandatory=False)
|
||||
|
||||
hostname = wtypes.wsattr(wtypes.text, readonly=True, mandatory=False)
|
||||
|
||||
def as_audit(self, context):
|
||||
audit_type_values = [val.value for val in objects.audit.AuditType]
|
||||
if self.audit_type not in audit_type_values:
|
||||
@@ -305,6 +307,9 @@ class Audit(base.APIBase):
|
||||
next_run_time = wsme.wsattr(datetime.datetime, mandatory=False)
|
||||
"""The next time audit launch"""
|
||||
|
||||
hostname = wsme.wsattr(wtypes.text, mandatory=False)
|
||||
"""Hostname the audit is running on"""
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
self.fields = []
|
||||
fields = list(objects.Audit.fields)
|
||||
|
||||
Reference in New Issue
Block a user