Implement a manifest builder, to allow for easier management of state around constructing manifests

This commit is contained in:
Joseph Schorr 2018-09-17 17:02:49 -04:00
parent 1224930af8
commit 65d5be23c7
5 changed files with 326 additions and 5 deletions

View file

@ -366,6 +366,13 @@ def get_image(repo, docker_image_id):
return None
def get_image_by_db_id(id):
try:
return Image.get(id=id)
except Image.DoesNotExist:
return None
def synthesize_v1_image(repo, image_storage_id, storage_image_size, docker_image_id,
created_date_str, comment, command, v1_json_metadata, parent_image=None):
""" Find an existing image with this docker image id, and if none exists, write one with the