Add a database last-modified-time
Add a new table which will have one record, simply containing the
last-modified-time of the database as a whole. Will be useful for
caching in the visualisation layer.
Create the table at startup in the main VLANd process if it doesn't
exist, and create the record too.
Add code to update the record on all other changes to the database.
Add code to report it through the daemon.status() API call.
Change-Id: I503c4371c04accb2c3f91adecc3e8a8a8614ea90
diff --git a/util.py b/util.py
index 9b30325..4c9816a 100644
--- a/util.py
+++ b/util.py
@@ -117,6 +117,7 @@
if command == 'daemon.status':
# data ignored
ret['running'] = 'ok'
+ ret['last_modified'] = state.db.get_last_modified_time()
elif command == 'daemon.version':
# data ignored
ret['version'] = state.version