From 5a7a613548c0bb77a078886f6b0a17f6a73638e7 Mon Sep 17 00:00:00 2001 From: Feng Shengqin Date: Mon, 18 Sep 2017 10:21:19 +0800 Subject: [PATCH] Add auto_remove to api-ref Change-Id: Icc81502bc6f1d7b65b7c47661f9e07ad65c649d3 --- api-ref/source/containers.inc | 3 +++ api-ref/source/parameters.yaml | 6 ++++++ api-ref/source/samples/container-create-req.json | 3 ++- api-ref/source/samples/container-create-resp.json | 3 ++- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/api-ref/source/containers.inc b/api-ref/source/containers.inc index 759cf02a6..8589b0194 100644 --- a/api-ref/source/containers.inc +++ b/api-ref/source/containers.inc @@ -50,6 +50,7 @@ Request - nets: nets - runtime: runtime - hostname: hostname + - auto_remove: auto_remove Request Example ---------------- @@ -85,6 +86,8 @@ Response - task_state: task_state - status_reason: status_reason - ports: ports + - auto_remove: auto_remove + Response Example ---------------- diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 26b0085b8..83560856c 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -47,6 +47,12 @@ addresses: IP address of the container. This includes both ipv4 and/or ipv6 addresses. in: body required: true +auto_remove: + description: | + enable auto-removal of the container on daemon side + when the container’s process exits. + in: body + type: boolean binary: in: body type: string diff --git a/api-ref/source/samples/container-create-req.json b/api-ref/source/samples/container-create-req.json index 5e44ebe87..c352537bd 100644 --- a/api-ref/source/samples/container-create-req.json +++ b/api-ref/source/samples/container-create-req.json @@ -28,5 +28,6 @@ } ], "runtime": "runc", - "hostname": "testhost" + "hostname": "testhost", + "auto_remove": "False" } diff --git a/api-ref/source/samples/container-create-resp.json b/api-ref/source/samples/container-create-resp.json index 552ad3659..31d62a238 100644 --- a/api-ref/source/samples/container-create-resp.json +++ b/api-ref/source/samples/container-create-resp.json @@ -35,5 +35,6 @@ "cpu": 2.0, "interactive": false, "runtime": "runc", - "hostname": "testhost" + "hostname": "testhost", + "auto_remove": "False" }