mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
Add api-version to DeepStats.
This commit is contained in:
parent
8d63208edd
commit
195d94cf2c
@ -16,9 +16,18 @@ class DeepStats(object):
|
||||
Holds results of the deep-stats opetation.
|
||||
Used for json generation in the API."""
|
||||
|
||||
# Json API version.
|
||||
# Rules:
|
||||
# - increment each time a field is removed or changes meaning.
|
||||
# - it's ok to add a new field without incrementing the version.
|
||||
API_VERSION = 1
|
||||
|
||||
def __init__(self, origin):
|
||||
"""Initializes DeepStats object. Sets most of the fields to 0."""
|
||||
self.origin = origin
|
||||
self.stats = {}
|
||||
self.stats = {
|
||||
'api-version': self.API_VERSION
|
||||
}
|
||||
for k in ["count-immutable-files",
|
||||
"count-mutable-files",
|
||||
"count-literal-files",
|
||||
|
Loading…
Reference in New Issue
Block a user