swagger: move NetworkingConfig to definitions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 89876e8165)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-07-03 15:11:54 +02:00
parent c30ff6885e
commit d7423180e7
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -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"
@ -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: ""