Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 7d189e5

Browse files
committed
swagger: sync updates to v1.40
Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 1e89ca40baef8cc8cf2af4b3e61c22b85de989c3) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 51bd95dc95a98007cb4c57444cba1c71b53472f2 Component: engine
1 parent 047a3b6 commit 7d189e5

1 file changed

Lines changed: 64 additions & 11 deletions

File tree

components/engine/docs/api/v1.40.yaml

Lines changed: 64 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,42 @@ definitions:
12021202
items:
12031203
type: "string"
12041204

1205+
NetworkingConfig:
1206+
description: |
1207+
NetworkingConfig represents the container's networking configuration for
1208+
each of its interfaces.
1209+
It is used for the networking configs specified in the `docker create`
1210+
and `docker network connect` commands.
1211+
type: "object"
1212+
properties:
1213+
EndpointsConfig:
1214+
description: |
1215+
A mapping of network name to endpoint configuration for that network.
1216+
type: "object"
1217+
additionalProperties:
1218+
$ref: "#/definitions/EndpointSettings"
1219+
example:
1220+
# putting an example here, instead of using the example values from
1221+
# /definitions/EndpointSettings, because containers/create currently
1222+
# does not support attaching to multiple networks, so the example request
1223+
# would be confusing if it showed that multiple networks can be contained
1224+
# in the EndpointsConfig.
1225+
# TODO remove once we support multiple networks on container create (see https://github.com/moby/moby/blob/07e6b843594e061f82baa5fa23c2ff7d536c2a05/daemon/create.go#L323)
1226+
EndpointsConfig:
1227+
isolated_nw:
1228+
IPAMConfig:
1229+
IPv4Address: "172.20.30.33"
1230+
IPv6Address: "2001:db8:abcd::3033"
1231+
LinkLocalIPs:
1232+
- "169.254.34.68"
1233+
- "fe80::3468"
1234+
Links:
1235+
- "container_1"
1236+
- "container_2"
1237+
Aliases:
1238+
- "server_x"
1239+
- "server_y"
1240+
12051241
NetworkSettings:
12061242
description: "NetworkSettings exposes the network settings in the API"
12071243
type: "object"
@@ -5123,16 +5159,7 @@ paths:
51235159
HostConfig:
51245160
$ref: "#/definitions/HostConfig"
51255161
NetworkingConfig:
5126-
description: "This container's networking configuration."
5127-
type: "object"
5128-
properties:
5129-
EndpointsConfig:
5130-
description: |
5131-
A mapping of network name to endpoint configuration
5132-
for that network.
5133-
type: "object"
5134-
additionalProperties:
5135-
$ref: "#/definitions/EndpointSettings"
5162+
$ref: "#/definitions/NetworkingConfig"
51365163
example:
51375164
Hostname: ""
51385165
Domainname: ""
@@ -5194,6 +5221,14 @@ paths:
51945221
- {}
51955222
BlkioDeviceWriteIOps:
51965223
- {}
5224+
DeviceRequests:
5225+
- Driver: "nvidia"
5226+
Count: -1
5227+
DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"]
5228+
Capabilities: [["gpu", "nvidia", "compute"]]
5229+
Options:
5230+
property1: "string"
5231+
property2: "string"
51975232
MemorySwappiness: 60
51985233
OomKillDisable: false
51995234
OomScoreAdj: 500
@@ -5328,7 +5363,7 @@ paths:
53285363
x-nullable: true
53295364
$ref: "#/definitions/ContainerState"
53305365
Image:
5331-
description: "The container's image"
5366+
description: "The container's image ID"
53325367
type: "string"
53335368
ResolvConfPath:
53345369
type: "string"
@@ -5447,6 +5482,14 @@ paths:
54475482
CpuRealtimePeriod: 1000000
54485483
CpuRealtimeRuntime: 10000
54495484
Devices: []
5485+
DeviceRequests:
5486+
- Driver: "nvidia"
5487+
Count: -1
5488+
DeviceIDs": ["0", "1", "GPU-fef8089b-4820-abfc-e83e-94318197576e"]
5489+
Capabilities: [["gpu", "nvidia", "compute"]]
5490+
Options:
5491+
property1: "string"
5492+
property2: "string"
54505493
IpcMode: ""
54515494
LxcConf: []
54525495
Memory: 0
@@ -5818,6 +5861,16 @@ paths:
58185861
If either `precpu_stats.online_cpus` or `cpu_stats.online_cpus` is
58195862
nil then for compatibility with older daemons the length of the
58205863
corresponding `cpu_usage.percpu_usage` array should be used.
5864+
5865+
To calculate the values shown by the `stats` command of the docker cli tool
5866+
the following formulas can be used:
5867+
* used_memory = `memory_stats.usage - memory_stats.stats.cache`
5868+
* available_memory = `memory_stats.limit`
5869+
* Memory usage % = `(used_memory / available_memory) * 100.0`
5870+
* cpu_delta = `cpu_stats.cpu_usage.total_usage - precpu_stats.cpu_usage.total_usage`
5871+
* system_cpu_delta = `cpu_stats.system_cpu_usage - precpu_stats.system_cpu_usage`
5872+
* number_cpus = `lenght(cpu_stats.cpu_usage.percpu_usage)` or `cpu_stats.online_cpus`
5873+
* CPU usage % = `(cpu_delta / system_cpu_delta) * number_cpus * 100.0`
58215874
operationId: "ContainerStats"
58225875
produces: ["application/json"]
58235876
responses:

0 commit comments

Comments
 (0)