Skip to content

Commit

Permalink
swagger: sync updates to v1.40
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Jul 23, 2020
1 parent cf96ded commit 1e89ca4
Showing 1 changed file with 64 additions and 11 deletions.
75 changes: 64 additions & 11 deletions docs/api/v1.40.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,42 @@ definitions:
items:
type: "string"

NetworkingConfig:
description: |
NetworkingConfig represents the container's networking configuration for
each of its interfaces.
It is used for the networking configs specified in the `docker create`
and `docker network connect` commands.
type: "object"
properties:
EndpointsConfig:
description: |
A mapping of network name to endpoint configuration for that network.
type: "object"
additionalProperties:
$ref: "#/definitions/EndpointSettings"
example:
# putting an example here, instead of using the example values from
# /definitions/EndpointSettings, because containers/create currently
# does not support attaching to multiple networks, so the example request
# would be confusing if it showed that multiple networks can be contained
# in the EndpointsConfig.
# TODO remove once we support multiple networks on container create (see https://github.com/moby/moby/blob/07e6b843594e061f82baa5fa23c2ff7d536c2a05/daemon/create.go#L323)
EndpointsConfig:
isolated_nw:
IPAMConfig:
IPv4Address: "172.20.30.33"
IPv6Address: "2001:db8:abcd::3033"
LinkLocalIPs:
- "169.254.34.68"
- "fe80::3468"
Links:
- "container_1"
- "container_2"
Aliases:
- "server_x"
- "server_y"

NetworkSettings:
description: "NetworkSettings exposes the network settings in the API"
type: "object"
Expand Down Expand Up @@ -5123,16 +5159,7 @@ paths:
HostConfig:
$ref: "#/definitions/HostConfig"
NetworkingConfig:
description: "This container's networking configuration."
type: "object"
properties:
EndpointsConfig:
description: |
A mapping of network name to endpoint configuration
for that network.
type: "object"
additionalProperties:
$ref: "#/definitions/EndpointSettings"
$ref: "#/definitions/NetworkingConfig"
example:
Hostname: ""
Domainname: ""
Expand Down Expand Up @@ -5194,6 +5221,14 @@ paths:
- {}
BlkioDeviceWriteIOps:
- {}
DeviceRequests:
- Driver: "nvidia"
Count: -1
DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"]
Capabilities: [["gpu", "nvidia", "compute"]]
Options:
property1: "string"
property2: "string"
MemorySwappiness: 60
OomKillDisable: false
OomScoreAdj: 500
Expand Down Expand Up @@ -5328,7 +5363,7 @@ paths:
x-nullable: true
$ref: "#/definitions/ContainerState"
Image:
description: "The container's image"
description: "The container's image ID"
type: "string"
ResolvConfPath:
type: "string"
Expand Down Expand Up @@ -5447,6 +5482,14 @@ paths:
CpuRealtimePeriod: 1000000
CpuRealtimeRuntime: 10000
Devices: []
DeviceRequests:
- Driver: "nvidia"
Count: -1
DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"]
Capabilities: [["gpu", "nvidia", "compute"]]
Options:
property1: "string"
property2: "string"
IpcMode: ""
LxcConf: []
Memory: 0
Expand Down Expand Up @@ -5818,6 +5861,16 @@ paths:
If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is
nil then for compatibility with older daemons the length of the
corresponding `cpu_usage.percpu_usage` array should be used.
To calculate the values shown by the `stats` command of the docker cli tool
the following formulas can be used:
* used_memory = `memory_stats.usage - memory_stats.stats.cache`
* available_memory = `memory_stats.limit`
* Memory usage % = `(used_memory / available_memory) * 100.0`
* cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
* system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
* number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
* CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
operationId: "ContainerStats"
produces: ["application/json"]
responses:
Expand Down

0 comments on commit 1e89ca4

Please sign in to comment.