Get the base image stuff working. Checkpoint before fixing the tests.
This commit is contained in:
parent
5742e6ea4e
commit
b619356907
120 changed files with 305 additions and 261 deletions
|
@ -1,20 +0,0 @@
|
|||
from data.database import Image
|
||||
from app import app
|
||||
import json
|
||||
|
||||
|
||||
store = app.config['STORAGE']
|
||||
|
||||
|
||||
for image in Image.select():
|
||||
if image.command == None:
|
||||
image_json_path = store.image_json_path(image.repository.namespace,
|
||||
image.repository.name,
|
||||
image.docker_image_id)
|
||||
if store.exists(image_json_path):
|
||||
data = json.loads(store.get_content(image_json_path))
|
||||
command_list = data.get('container_config', {}).get('Cmd', None)
|
||||
command = json.dumps(command_list) if command_list else None
|
||||
print 'Setting command to: %s' % command
|
||||
image.command = command
|
||||
image.save()
|
|
@ -1,17 +0,0 @@
|
|||
from data.database import Image
|
||||
from app import app
|
||||
|
||||
|
||||
store = app.config['STORAGE']
|
||||
|
||||
|
||||
for image in Image.select():
|
||||
if image.image_size == None:
|
||||
image_path = store.image_layer_path(image.repository.namespace,
|
||||
image.repository.name,
|
||||
image.docker_image_id)
|
||||
if store.exists(image_path):
|
||||
size = store.get_size(image_path)
|
||||
print 'Setting image %s size to: %s' % (image.docker_image_id, size)
|
||||
image.image_size = size
|
||||
image.save()
|
Reference in a new issue