add start and end time for continuous audit

Add new start_time and end_time fields in the audit table

Partially Implements: blueprint add-start-end-time-for-continuous-audit

Change-Id: I6bb838d777b2c7aa799a70485980e5dc87838456
This commit is contained in:
licanwei
2018-03-27 02:23:56 -07:00
committed by Alexander Chadin
parent f41adc7e8b
commit c2550e534e
12 changed files with 185 additions and 8 deletions

View File

@@ -88,7 +88,8 @@ class Audit(base.WatcherPersistentObject, base.WatcherObject,
# 'interval' type has been changed from Integer to String
# Version 1.4: Added 'name' string field
# Version 1.5: Added 'hostname' field
VERSION = '1.5'
# Version 1.6: Added 'start_time' and 'end_time' DateTime fields
VERSION = '1.6'
dbapi = db_api.get_instance()
@@ -107,6 +108,8 @@ class Audit(base.WatcherPersistentObject, base.WatcherObject,
'next_run_time': wfields.DateTimeField(nullable=True,
tzinfo_aware=False),
'hostname': wfields.StringField(nullable=True),
'start_time': wfields.DateTimeField(nullable=True, tzinfo_aware=False),
'end_time': wfields.DateTimeField(nullable=True, tzinfo_aware=False),
'goal': wfields.ObjectField('Goal', nullable=True),
'strategy': wfields.ObjectField('Strategy', nullable=True),