add name for audit, update audit notifications

upgrade notifications

Change-Id: Ia8b7f36a8a2965bc8ec2243a10556592926297b2
Implements:blueprint add-name-for-audit
This commit is contained in:
suzhengwei
2017-06-23 10:48:24 +08:00
parent a3be1587e3
commit 907cc2df16
19 changed files with 48 additions and 17 deletions

View File

@@ -33,7 +33,7 @@ CONF = cfg.CONF
class TerseAuditPayload(notificationbase.NotificationPayloadBase):
SCHEMA = {
'uuid': ('audit', 'uuid'),
'name': ('audit', 'name'),
'audit_type': ('audit', 'audit_type'),
'state': ('audit', 'state'),
'parameters': ('audit', 'parameters'),
@@ -51,10 +51,12 @@ class TerseAuditPayload(notificationbase.NotificationPayloadBase):
# Version 1.1: Added 'auto_trigger' boolean field,
# Added 'next_run_time' DateTime field,
# 'interval' type has been changed from Integer to String
VERSION = '1.1'
# Version 1.2: Added 'name' string field
VERSION = '1.2'
fields = {
'uuid': wfields.UUIDField(),
'name': wfields.StringField(),
'audit_type': wfields.StringField(),
'state': wfields.StringField(),
'parameters': wfields.FlexibleDictField(nullable=True),
@@ -80,7 +82,7 @@ class TerseAuditPayload(notificationbase.NotificationPayloadBase):
class AuditPayload(TerseAuditPayload):
SCHEMA = {
'uuid': ('audit', 'uuid'),
'name': ('audit', 'name'),
'audit_type': ('audit', 'audit_type'),
'state': ('audit', 'state'),
'parameters': ('audit', 'parameters'),
@@ -97,7 +99,8 @@ class AuditPayload(TerseAuditPayload):
# Version 1.0: Initial version
# Version 1.1: Added 'auto_trigger' field,
# Added 'next_run_time' field
VERSION = '1.1'
# Version 1.2: Added 'name' string field
VERSION = '1.2'
fields = {
'goal': wfields.ObjectField('GoalPayload'),