From f39ad3fbd222f1e2fcf7d1f97b9ccc47d306fd00 Mon Sep 17 00:00:00 2001 From: miaohb Date: Sat, 26 Aug 2017 00:34:28 -0700 Subject: [PATCH] Add api-ref for container commit This patch adds api-ref for container commit. Change-Id: Ibcb7846cd9d0c00c385196635d9b9b03c65dba82 Partially-Implements: bp zun-api-doc --- api-ref/source/containers.inc | 40 +++++++++++++++++++++++++++++++++- api-ref/source/parameters.yaml | 11 ++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/api-ref/source/containers.inc b/api-ref/source/containers.inc index cda26afbe..d221717fb 100644 --- a/api-ref/source/containers.inc +++ b/api-ref/source/containers.inc @@ -5,7 +5,7 @@ =================== Lists, creates, shows details for, stats, updates, deletes, starts, -stops, pauses, unpauses, restarts, renames containers, and adds +stops, pauses, unpauses, restarts, renames, commits containers, and adds security group for specified container. Create new container @@ -654,3 +654,41 @@ This request does not return anything in the response body. .. rest_parameters:: parameters.yaml - X-Openstack-Request-Id: request_id + + +Commit a container +================== + +.. rest_method:: POST /v1/containers/{container_ident}/commit?tag={tag}&repository={repository} + +Create a new image from a container's changes + +Response Codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 401 + - 403 + - 404 + - 409 + +Request +------- + +.. rest_parameters:: parameters.yaml + + - container_ident: container_ident + - repository: repository + - tag: tag + +Response +-------- + +.. rest_parameters:: parameters.yaml + + - image: image diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 8dc545639..20c0abb37 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -217,6 +217,11 @@ report_count: in: body required: true type: integer +repository: + description: | + The reposiroty of the container image. + in: body + type: string restart_policy: description: | Restart policy to apply when a container exits. Allowed values are @@ -277,6 +282,12 @@ status_reason: in: body required: true type: string +tag: + description: | + The tag of the container image. + in: body + required: true + type: string task_state: description: | The current task of the container.