Add api-ref for container execute resize

This patch adds api-ref for container execute resize.

Change-Id: If037734d7e85412ac84ca061c391eaf44c8acb9f
Closes-Bug: #1720926
This commit is contained in:
miaohb 2017-10-16 04:34:37 -07:00
parent deaa99a797
commit f558707746
3 changed files with 62 additions and 1 deletions

View File

@ -8,7 +8,8 @@ Lists, creates, shows details for, stats, updates, deletes, starts, resizes,
stops, pauses, unpauses, restarts, renames, commits, kills, attaches to containers,
gets archive from container, puts archive to container, and adds security group
for specified container, executes command in a running container, gets logs
of a container, displays the running processes in a container.
of a container, displays the running processes in a container, resizes
the tty session used by the exec.
Create new container
====================
@ -1048,6 +1049,51 @@ Response Example
:language: javascript
Resize tty when execute command in a container
==============================================
.. rest_method:: POST /v1/containers/{container_ident}/execute_resize?h={height}&&exec_id={exec_id}&w={width}
Resize tty when execute command in a container.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 400
- 401
- 403
- 404
Request
-------
.. rest_parameters:: parameters.yaml
- container_ident: container_ident
- height: height
- exec_id: exec_resize_id
- width: width
Response
--------
.. rest_parameters:: parameters.yaml
- exec_resize_output: exec_resize_output
Response Example
----------------
.. literalinclude:: samples/container-execute-resize-resp.json
:language: javascript
Get logs of a container
=======================

View File

@ -35,6 +35,12 @@ exec_interactive:
in: query
required: false
type: boolean
exec_resize_id:
description: |
The ID of the exec instance.
in: query
required: true
type: string
exec_run:
description: |
Whether to run the command or not. If this parameter is set to true,
@ -249,6 +255,11 @@ exec_output:
The output of the command executed in a container.
in: body
type: dict
exec_resize_output:
description: |
The output of exec_resize, including exec_id and websocket url.
in: body
type: array
exec_url:
description: |
The URL to start an exec instance.

View File

@ -0,0 +1,4 @@
{
"exec_id": "c75e81815181bb22558306fffcaa7d049f4a79378ea70802ee6c4334d0597860",
"url": "ws://0.0.0.0:6784/?token=062411f1-7995-413b-988f-ba8f6c553c6c&uuid=b7074d3a-14e4-4d5a-95cc-579fef16e033"
}