Move v1 checksums to image and track v2 separately

This commit is contained in:
Jake Moshenko 2015-11-04 16:18:53 -05:00 committed by Jimmy Zelinskie
parent 2b3633b107
commit 3d0bcbaaeb
8 changed files with 65 additions and 17 deletions

View file

@ -75,6 +75,14 @@ def simple_checksum_handler(json_data):
return h, fn
def content_checksum_handler():
h = hashlib.sha256()
def fn(buf):
h.update(buf)
return h, fn
def compute_simple(fp, json_data):
data = json_data + '\n'
return 'sha256:{0}'.format(sha256_file(fp, data))