Address comments

This commit is contained in:
Joseph Schorr 2015-02-02 14:07:32 -05:00
parent 1022355bb1
commit 84e5c0644e
4 changed files with 7 additions and 3 deletions

View file

@ -168,7 +168,7 @@ def _repo_verb(namespace, repository, tag, verb, formatter, checker=None, **kwar
@verbs.route('/aci/<server>/<namespace>/<repository>/<tag>/aci/<os>/<arch>/', methods=['GET'])
@process_auth
def get_rocket_image(server, namespace, repository, tag, os, arch):
def get_aci_image(server, namespace, repository, tag, os, arch):
def checker(image_json):
# Verify the architecture and os.
operating_system = image_json.get('os', 'linux')

View file

@ -150,7 +150,7 @@ class ACIImage(TarImageFormatter):
manifest = {
"acKind": "ImageManifest",
"acVersion": "0.1.1",
"acVersion": "0.2.0",
"name": '%s/%s/%s/%s' % (hostname, namespace, repository, tag),
"labels": [
{
@ -172,7 +172,8 @@ class ACIImage(TarImageFormatter):
"group": config.get('Group', '') or 'root',
"eventHandlers": [],
"workingDirectory": config.get('WorkingDir', ''),
"environment": {key:value for (key, value) in [e.split('=') for e in config.get('Env')]},
"environment": [(key, value)
for (key, value) in [e.split('=') for e in config.get('Env')]],
"isolators": self._build_isolators(config),
"mountPoints": self._build_volumes(config),
"ports": self._build_ports(config),

Binary file not shown.

View file

@ -39,6 +39,9 @@ class TarLayerFormat(object):
# Yield the tar header.
if self.path_prefix:
# Note: We use a copy here because we need to make sure we copy over all the internal
# data of the tar header. We cannot use frombuf(tobuf()), however, because it doesn't
# properly handle large filenames.
clone = copy.deepcopy(tar_info)
clone.name = os.path.join(self.path_prefix, clone.name)
yield clone.tobuf()