From 07efee153102508d5cd56b5032b339676b5ea930 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Fri, 13 Mar 2015 15:31:36 -0400 Subject: [PATCH 1/2] formats/aci: update isolators to ACI 0.4.1 --- formats/aci.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/formats/aci.py b/formats/aci.py index b5c40effd..37e8917ab 100644 --- a/formats/aci.py +++ b/formats/aci.py @@ -33,26 +33,34 @@ class ACIImage(TarImageFormatter): def _isolate_memory(memory): return { "name": "memory/limit", - "value": str(memory) + 'B' + "value": { + "request": str(memory) + 'B', + } } def _isolate_swap(memory): return { "name": "memory/swap", - "value": str(memory) + 'B' + "value": { + "request": str(memory) + 'B', + } } def _isolate_cpu(cpu): return { "name": "cpu/shares", - "value": str(cpu) + "value": { + "request": str(cpu), + } } def _isolate_capabilities(capabilities_set_value): capabilities_set = re.split(r'[\s,]', capabilities_set_value) return { - "name": "capabilities/bounding-set", - "value": ' '.join(capabilities_set) + "name": "os/linux/capabilities-retain-set", + "value": { + "set": capabilities_set, + } } mappers = { @@ -154,7 +162,7 @@ class ACIImage(TarImageFormatter): manifest = { "acKind": "ImageManifest", - "acVersion": "0.2.0", + "acVersion": "0.4.1", "name": '%s/%s/%s/%s' % (hostname, namespace, repository, tag), "labels": [ { From 20157571b0456034e7be8df7a36a7b6f217830f0 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Tue, 28 Jul 2015 12:05:11 -0400 Subject: [PATCH 2/2] formats/aci: update to ACI spec 0.6.1 Fixes #278. --- formats/aci.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/formats/aci.py b/formats/aci.py index 37e8917ab..4435acbaf 100644 --- a/formats/aci.py +++ b/formats/aci.py @@ -103,7 +103,7 @@ class ACIImage(TarImageFormatter): ports.append({ "name": "port-%s" % port_number, "port": port_number, - "protocol": protocol + "protocol": protocol, }) except ValueError: pass @@ -134,7 +134,7 @@ class ACIImage(TarImageFormatter): volumes.append({ "name": get_name(docker_volume_path), "path": docker_volume_path, - "readOnly": False + "readOnly": False, }) return volumes @@ -162,12 +162,12 @@ class ACIImage(TarImageFormatter): manifest = { "acKind": "ImageManifest", - "acVersion": "0.4.1", - "name": '%s/%s/%s/%s' % (hostname, namespace, repository, tag), + "acVersion": "0.6.1", + "name": '%s/%s/%s/' % (hostname, namespace, repository), "labels": [ { "name": "version", - "value": "1.0.0" + "value": tag, }, { "name": "arch",