Commit 8aef87eb authored by Sofia Papagiannaki's avatar Sofia Papagiannaki Committed by Christos Stavrakakis
Browse files

pithos: Include "available" in detail object listing.

parent ebb23aa5
......@@ -244,9 +244,6 @@ def put_object_headers(response, meta, restricted=False, token=None,
response['Content-Type'] = meta.get('type', 'application/octet-stream')
response['Last-Modified'] = http_date(int(meta['modified']))
response['Available'] = meta['available']
response['Map-Checked-At'] = (
http_date(int(meta['map_check_timestamp'])) if
meta['map_check_timestamp'] is not None else '')
if not restricted:
response['X-Object-Hash'] = meta['hash']
response['X-Object-UUID'] = meta['uuid']
......
......@@ -696,7 +696,9 @@ class Node(DBWorker):
self.versions.c.muser,
self.versions.c.uuid,
self.versions.c.checksum,
self.versions.c.cluster])
self.versions.c.cluster,
self.versions.c.available,
self.versions.c.map_check_timestamp])
if before != inf:
filtered = select([func.max(self.versions.c.serial)],
self.versions.c.node == node)
......@@ -1191,7 +1193,9 @@ class Node(DBWorker):
self.versions.c.mtime, self.versions.c.muser,
self.versions.c.uuid,
self.versions.c.checksum,
self.versions.c.cluster],
self.versions.c.cluster,
self.versions.c.available,
self.versions.c.map_check_timestamp],
from_obj=[inner_join]).distinct()
s = s.where(self.versions.c.cluster != except_cluster)
......
......@@ -934,7 +934,9 @@ class ModularBackend(BaseBackend):
'modified': p[self.MTIME + 1] if until is None else None,
'modified_by': p[self.MUSER + 1],
'uuid': p[self.UUID + 1],
'checksum': p[self.CHECKSUM + 1]})
'checksum': p[self.CHECKSUM + 1],
'available': p[self.AVAILABLE + 1],
'map_check_timestamp': p[self.MAP_CHECK_TIMESTAMP + 1]})
return objects
@debug_method
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment