Skip to content

Commit

Permalink
swagger: move NetworkingConfig to definitions
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 3, 2020
1 parent a70842f commit 89876e8
Showing 1 changed file with 37 additions and 10 deletions.
47 changes: 37 additions & 10 deletions api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,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 @@ -5234,16 +5270,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

0 comments on commit 89876e8

Please sign in to comment.