Merge "Add HA support"

This commit is contained in:
Zuul
2018-07-26 11:49:28 +00:00
committed by Gerrit Code Review
19 changed files with 298 additions and 17 deletions

View File

@@ -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 = []

View File

@@ -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)