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.