From 9fee66bce74c5492cca8a42bbee08a7c895d3d92 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 10 Aug 2017 21:24:20 +0200 Subject: [PATCH] Add missing definition for Node.Status The `Node.Status` property was only present in the example, but not in the definition. This patch adds definitions for `NodeStatus` and `NodeState`, similar to what is used in the code; - https://github.com/moby/moby/blob/f02a5b50c407bdb087388e18e1ac619f2788dd8d/api/types/swarm/node.go#L77-L82 - https://github.com/moby/moby/blob/f02a5b50c407bdb087388e18e1ac619f2788dd8d/api/types/swarm/node.go#L103-L115 Signed-off-by: Sebastiaan van Stijn Upstream-commit: 26b247e706e613af5214e4a89de375128f3368dd Component: engine --- components/engine/api/swagger.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/components/engine/api/swagger.yaml b/components/engine/api/swagger.yaml index 0ae47b37bd..d9704e4420 100644 --- a/components/engine/api/swagger.yaml +++ b/components/engine/api/swagger.yaml @@ -2087,6 +2087,8 @@ definitions: type: "string" TLSInfo: $ref: "#/definitions/TLSInfo" + Status: + $ref: "#/definitions/NodeStatus" example: ID: "24ifsmvkjbyhk" Version: @@ -2208,6 +2210,33 @@ definitions: CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" + NodeStatus: + description: | + NodeStatus represents the status of a node. + + It provides the current status of the node, as seen by the manager. + type: "object" + properties: + State: + $ref: "#/definitions/NodeState" + Message: + type: "string" + example: "" + Addr: + description: "IP address of the node." + type: "string" + example: "172.17.0.2" + + NodeState: + description: "NodeState represents the state of a node." + type: "string" + enum: + - "unknown" + - "down" + - "ready" + - "disconnected" + example: "ready" + SwarmSpec: description: "User modifiable swarm configuration." type: "object"