Merge "Add api-ref for container stats"

This commit is contained in:
Jenkins 2017-07-14 21:57:18 +00:00 committed by Gerrit Code Review
commit b41d459b0e
3 changed files with 60 additions and 1 deletions

View File

@ -4,7 +4,7 @@
Manage Containers Manage Containers
=================== ===================
Lists, creates, shows details for, updates, deletes, starts, Lists, creates, shows details for, stats, updates, deletes, starts,
stops, pauses, unpauses, restarts and renames containers. stops, pauses, unpauses, restarts and renames containers.
Create new container Create new container
@ -244,6 +244,49 @@ This request does not return anything in the response body.
- X-Openstack-Request-Id: request_id - X-Openstack-Request-Id: request_id
Display stats of a container
============================
.. rest_method:: GET /v1/containers/{container_ident}/stats
Display stats of a container.
Response Codes
--------------
.. rest_status_code:: success status.yaml
- 200
.. rest_status_code:: error status.yaml
- 401
- 403
- 404
- 409
Request
-------
.. rest_parameters:: parameters.yaml
- container_ident: container_ident
Response
--------
.. rest_parameters:: parameters.yaml
- stats_info: stats_info
Response Example
----------------
.. literalinclude:: samples/container-stats-resp.json
:language: javascript
Update information of container Update information of container
=============================== ===============================

View File

@ -209,6 +209,13 @@ state:
in: body in: body
required: true required: true
type: string type: string
stats_info:
description: |
The stats information of a container,
including cpu, memory, blk io and net io.
in: body
required: true
type: dict
status: status:
description: | description: |
The current state of the container. The current state of the container.

View File

@ -0,0 +1,9 @@
{
"CONTAINER": "test",
"CPU %": 8.89,
"MEM USAGE(MiB)": 7,
"MEM LIMIT(MiB)": 16048,
"MEM %": 0.0436191425723,
"BLOCK I/O(B)": "12910592/0",
"NET I/O(B)": "246614/648"
}