Add code for saving and displaying the size of images

This commit is contained in:
Joseph Schorr 2014-01-03 16:32:00 -05:00
parent 8e4bbdf1dd
commit 0a63690e25
7 changed files with 42 additions and 0 deletions

View file

@ -3,6 +3,7 @@ import string
import shutil
import os
import hashlib
import random
from datetime import datetime, timedelta
from flask import url_for
@ -55,6 +56,8 @@ def __create_subtree(repo, structure, parent):
repo.name, str(creation_time),
'no comment', parent)
model.set_image_size(docker_image_id, repo.namespace, repo.name, random.randrange(1, 1024 * 1024 * 1024))
# Populate the diff file
diff_path = store.image_file_diffs_path(repo.namespace, repo.name,
docker_image_id)