1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Update service networks documentation

The previous description stated that an array of names / ids could be passed when the API in reality expects objects in the form of NetworkAttachmentConfig. This is fixed by updating the description and adding a definition for NetworkAttachmentConfig.

Signed-off-by: Hannes Ljungberg <hannes@5monkeys.se>
(cherry picked from commit 4d09fab232)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Hannes Ljungberg 2019-07-11 16:12:52 +02:00 committed by Sebastiaan van Stijn
parent e4e71dcf6b
commit 37851d8f5b
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -3002,16 +3002,10 @@ definitions:
description: "Runtime is the type of runtime specified for the task executor."
type: "string"
Networks:
description: "Specifies which networks the service should attach to."
type: "array"
items:
type: "object"
properties:
Target:
type: "string"
Aliases:
type: "array"
items:
type: "string"
$ref: "#/definitions/NetworkAttachmentConfig"
LogDriver:
description: "Specifies the log driver to use for tasks created from this spec. If not present, the default one for the swarm will be used, finally falling back to the engine default if not specified."
type: "object"
@ -3257,17 +3251,11 @@ definitions:
- "stop-first"
- "start-first"
Networks:
description: "Array of network names or IDs to attach the service to."
description: "Specifies which networks the service should attach to."
type: "array"
items:
type: "object"
properties:
Target:
type: "string"
Aliases:
type: "array"
items:
type: "string"
$ref: "#/definitions/NetworkAttachmentConfig"
EndpointSpec:
$ref: "#/definitions/EndpointSpec"
@ -4439,6 +4427,24 @@ definitions:
IP address and ports at which this node can be reached.
type: "string"
NetworkAttachmentConfig:
description: "Specifies how a service should be attached to a particular network."
type: "object"
properties:
Target:
description: "The target network for attachment. Must be a network name or ID."
type: "string"
Aliases:
description: "Discoverable alternate names for the service on this network."
type: "array"
items:
type: "string"
DriverOpts:
description: "Driver attachment options for the network target"
type: "object"
additionalProperties:
type: "string"
paths:
/containers/json:
get: