From 8a9c9ec9a99ccf56b344137c2ff03a64fbe5aff8 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 8 Aug 2017 00:12:30 +0200 Subject: [PATCH 01/13] Reformat definitions - add some whitespace Signed-off-by: Sebastiaan van Stijn Upstream-commit: f720f9cc33e1be12b767f5066511266d87a7673b Component: engine --- components/engine/api/swagger.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/components/engine/api/swagger.yaml b/components/engine/api/swagger.yaml index 369175411c..6ff9584ca9 100644 --- a/components/engine/api/swagger.yaml +++ b/components/engine/api/swagger.yaml @@ -301,6 +301,7 @@ definitions: Mode: description: "The permission mode for the tmpfs mount in an integer." type: "integer" + RestartPolicy: description: | The behavior to apply when the container exits. The default is not to restart. @@ -1457,6 +1458,7 @@ definitions: type: "object" additionalProperties: type: "string" + NetworkContainer: type: "object" properties: @@ -1512,6 +1514,7 @@ definitions: type: "string" progressDetail: $ref: "#/definitions/ProgressDetail" + ErrorDetail: type: "object" properties: @@ -1519,6 +1522,7 @@ definitions: type: "integer" message: type: "string" + ProgressDetail: type: "object" properties: @@ -1685,6 +1689,7 @@ definitions: example: - "rbind" - "rw" + PluginDevice: type: "object" required: [Name, Description, Settable, Path] @@ -1988,6 +1993,7 @@ definitions: Role: "manager" Labels: foo: "bar" + Node: type: "object" properties: @@ -2101,6 +2107,7 @@ definitions: -----END CERTIFICATE----- CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" + TLSInfo: description: "Information about the issuer of leaf TLS certificates and the trusted root CA certificate" type: "object" @@ -2128,6 +2135,7 @@ definitions: -----END CERTIFICATE----- CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" + SwarmSpec: description: "User modifiable swarm configuration." type: "object" @@ -2265,6 +2273,7 @@ definitions: Manager: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" EncryptionConfig: AutoLockManagers: false + # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but # without `JoinTokens`. ClusterInfo: @@ -2288,6 +2297,7 @@ definitions: RootRotationInProgress: description: "Whether there is currently a root CA rotation in progress for the swarm" type: "boolean" + TaskSpec: description: "User modifiable task configuration." type: "object" @@ -2617,6 +2627,7 @@ definitions: type: "object" additionalProperties: type: "string" + TaskState: type: "string" enum: @@ -2633,6 +2644,7 @@ definitions: - "shutdown" - "failed" - "rejected" + Task: type: "object" properties: @@ -2756,6 +2768,7 @@ definitions: - NamedResourceSpec: Kind: "GPU" Value: "UUID2" + ServiceSpec: description: "User modifiable configuration for a service." properties: @@ -2860,6 +2873,7 @@ definitions: type: "string" EndpointSpec: $ref: "#/definitions/EndpointSpec" + EndpointPortConfig: type: "object" properties: @@ -2876,6 +2890,7 @@ definitions: PublishedPort: description: "The port on the swarm hosts." type: "integer" + EndpointSpec: description: "Properties that can be configured to access and load balance a service." type: "object" @@ -2893,6 +2908,7 @@ definitions: type: "array" items: $ref: "#/definitions/EndpointPortConfig" + Service: type: "object" properties: @@ -3005,6 +3021,7 @@ definitions: - NetworkID: "4qvuz4ko70xaltuqbt8956gd1" Addr: "10.255.0.3/16" + ImageDeleteResponseItem: type: "object" properties: @@ -3014,6 +3031,7 @@ definitions: Deleted: description: "The image ID of an image that was deleted" type: "string" + ServiceUpdateResponse: type: "object" properties: @@ -3024,6 +3042,7 @@ definitions: type: "string" example: Warning: "unable to pin image doesnotexist:latest to digest: image library/doesnotexist:latest not found" + ContainerSummary: type: "array" items: @@ -3158,6 +3177,7 @@ definitions: example: "2017-07-20T13:55:28.678958722Z" Spec: $ref: "#/definitions/SecretSpec" + ConfigSpec: type: "object" properties: @@ -3174,6 +3194,7 @@ definitions: Base64-url-safe-encoded ([RFC 4648](https://tools.ietf.org/html/rfc4648#section-3.2)) config data. type: "string" + Config: type: "object" properties: From d01174e4e5e6a5e6d8a12542e96a362dc88506d3 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 10 Aug 2017 19:51:02 +0200 Subject: [PATCH 02/13] Add extra example values to definitions Signed-off-by: Sebastiaan van Stijn Upstream-commit: fa05a53426da6183199a97071e3d60a6d41a39be Component: engine --- components/engine/api/swagger.yaml | 90 +++++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 2 deletions(-) diff --git a/components/engine/api/swagger.yaml b/components/engine/api/swagger.yaml index 6ff9584ca9..0d01fa8183 100644 --- a/components/engine/api/swagger.yaml +++ b/components/engine/api/swagger.yaml @@ -401,6 +401,7 @@ definitions: CpusetCpus: description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)" type: "string" + example: "0-3" CpusetMems: description: "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems." type: "string" @@ -495,9 +496,11 @@ definitions: NanoCPUs: type: "integer" format: "int64" + example: 4000000000 MemoryBytes: type: "integer" format: "int64" + example: 8272408576 GenericResources: $ref: "#/definitions/GenericResources" @@ -522,6 +525,16 @@ definitions: Value: type: "integer" format: "int64" + example: + - DiscreteResourceSpec: + Kind: "SSD" + Value: 3 + - NamedResourceSpec: + Kind: "GPU" + Value: "UUID1" + - NamedResourceSpec: + Kind: "GPU" + Value: "UUID2" HealthConfig: description: "A test to perform to check that the container is healthy." @@ -688,6 +701,7 @@ definitions: OomScoreAdj: type: "integer" description: "An integer value containing the score given to the container in order to tune OOM killer preferences." + example: 500 PidMode: type: "string" description: | @@ -1962,6 +1976,7 @@ definitions: Index: type: "integer" format: "int64" + example: 373531 NodeSpec: type: "object" @@ -1969,6 +1984,7 @@ definitions: Name: description: "Name for the node." type: "string" + example: "my-node" Labels: description: "User-defined key/value metadata." type: "object" @@ -1980,6 +1996,7 @@ definitions: enum: - "worker" - "manager" + example: "manager" Availability: description: "Availability of the node." type: "string" @@ -1987,6 +2004,7 @@ definitions: - "active" - "pause" - "drain" + example: "active" example: Availability: "active" Name: "node-name" @@ -1999,14 +2017,17 @@ definitions: properties: ID: type: "string" + example: "24ifsmvkjbyhk" Version: $ref: "#/definitions/ObjectVersion" CreatedAt: type: "string" format: "dateTime" + example: "2016-08-18T10:44:24.496525531Z" UpdatedAt: type: "string" format: "dateTime" + example: "2017-08-09T07:09:37.632105588Z" Spec: $ref: "#/definitions/NodeSpec" Description: @@ -2014,13 +2035,16 @@ definitions: properties: Hostname: type: "string" + example: "bf3067039e47" Platform: type: "object" properties: Architecture: type: "string" + example: "x86_64" OS: type: "string" + example: "linux" Resources: $ref: "#/definitions/ResourceObject" Engine: @@ -2028,10 +2052,13 @@ definitions: properties: EngineVersion: type: "string" + example: "17.06.0" Labels: type: "object" additionalProperties: type: "string" + example: + foo: "bar" Plugins: type: "array" items: @@ -2078,14 +2105,42 @@ definitions: Labels: foo: "bar" Plugins: - - Type: "Volume" - Name: "local" + - Type: "Log" + Name: "awslogs" + - Type: "Log" + Name: "fluentd" + - Type: "Log" + Name: "gcplogs" + - Type: "Log" + Name: "gelf" + - Type: "Log" + Name: "journald" + - Type: "Log" + Name: "json-file" + - Type: "Log" + Name: "logentries" + - Type: "Log" + Name: "splunk" + - Type: "Log" + Name: "syslog" - Type: "Network" Name: "bridge" + - Type: "Network" + Name: "host" + - Type: "Network" + Name: "ipvlan" + - Type: "Network" + Name: "macvlan" - Type: "Network" Name: "null" - Type: "Network" Name: "overlay" + - Type: "Volume" + Name: "local" + - Type: "Volume" + Name: "localhost:5000/vieux/sshfs:latest" + - Type: "Volume" + Name: "vieux/sshfs:latest" Status: State: "ready" Addr: "172.17.0.2" @@ -2143,11 +2198,15 @@ definitions: Name: description: "Name of the swarm." type: "string" + example: "default" Labels: description: "User-defined key/value metadata." type: "object" additionalProperties: type: "string" + example: + com.example.corp.type: "production" + com.example.corp.department: "engineering" Orchestration: description: "Orchestration configuration." type: "object" @@ -2156,6 +2215,7 @@ definitions: description: "The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks." type: "integer" format: "int64" + example: 10 Raft: description: "Raft configuration." type: "object" @@ -2164,6 +2224,7 @@ definitions: description: "The number of log entries between snapshots." type: "integer" format: "int64" + example: 10000 KeepOldSnapshots: description: "The number of snapshots to keep beyond the current snapshot." type: "integer" @@ -2172,18 +2233,21 @@ definitions: description: "The number of log entries to keep around to sync up slow followers after a snapshot is created." type: "integer" format: "int64" + example: 500 ElectionTick: description: | The number of ticks that a follower will wait for a message from the leader before becoming a candidate and starting an election. `ElectionTick` must be greater than `HeartbeatTick`. A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. type: "integer" + example: 3 HeartbeatTick: description: | The number of ticks between heartbeats. Every HeartbeatTick ticks, the leader will send a heartbeat to the followers. A tick currently defaults to one second, so these translate directly to seconds currently, but this is NOT guaranteed. type: "integer" + example: 1 Dispatcher: description: "Dispatcher configuration." type: "object" @@ -2192,6 +2256,7 @@ definitions: description: "The delay for an agent to send a heartbeat to the dispatcher." type: "integer" format: "int64" + example: 5000000000 CAConfig: description: "CA configuration." type: "object" @@ -2200,6 +2265,7 @@ definitions: description: "The duration node certificates are issued for." type: "integer" format: "int64" + example: 7776000000000000 ExternalCAs: description: "Configuration for forwarding signing requests to an external certificate authority." type: "array" @@ -2238,6 +2304,7 @@ definitions: AutoLockManagers: description: "If set, generate a key and use it to lock data stored on the managers." type: "boolean" + example: false TaskDefaults: description: "Defaults for creating tasks in this cluster." type: "object" @@ -2251,10 +2318,14 @@ definitions: properties: Name: type: "string" + example: "json-file" Options: type: "object" additionalProperties: type: "string" + example: + "max-file": "10" + "max-size": "100m" example: Name: "default" Orchestration: @@ -2282,14 +2353,17 @@ definitions: ID: description: "The ID of the swarm." type: "string" + example: "abajmipo7b4xz5ip2nrla6b11" Version: $ref: "#/definitions/ObjectVersion" CreatedAt: type: "string" format: "dateTime" + example: "2016-08-18T10:44:24.496525531Z" UpdatedAt: type: "string" format: "dateTime" + example: "2017-08-09T07:09:37.632105588Z" Spec: $ref: "#/definitions/SwarmSpec" TLSInfo: @@ -2297,6 +2371,7 @@ definitions: RootRotationInProgress: description: "Whether there is currently a root CA rotation in progress for the swarm" type: "boolean" + example: false TaskSpec: description: "User modifiable task configuration." @@ -2578,6 +2653,10 @@ definitions: type: "array" items: type: "string" + example: + - "node.hostname!=node3.corp.example.com" + - "node.role!=manager" + - "node.labels.type==production" Preferences: description: "Preferences provide a way to make the scheduler aware of factors such as topology. They are provided in order from highest to lowest precedence." type: "array" @@ -2590,6 +2669,11 @@ definitions: SpreadDescriptor: description: "label descriptor, such as engine.labels.az" type: "string" + example: + - Spread: + SpreadDescriptor: "node.labels.datacenter" + - Spread: + SpreadDescriptor: "node.labels.rack" Platforms: description: "An array of supported platforms." type: "array" @@ -2598,8 +2682,10 @@ definitions: properties: Architecture: type: "string" + example: "amd64" OS: type: "string" + example: "linux" ForceUpdate: description: "A counter that triggers an update even if no relevant parameters have been changed." type: "integer" From da62e4870888b9daca23ab7d7aadc1c6e2c19de3 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 10 Aug 2017 20:19:27 +0200 Subject: [PATCH 03/13] Update / add extra description fields to Swagger Signed-off-by: Sebastiaan van Stijn Upstream-commit: 934378bee3846b1f0b790d3ee185d161900cb953 Component: engine --- components/engine/api/swagger.yaml | 55 +++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 8 deletions(-) diff --git a/components/engine/api/swagger.yaml b/components/engine/api/swagger.yaml index 0d01fa8183..0ce735f0fb 100644 --- a/components/engine/api/swagger.yaml +++ b/components/engine/api/swagger.yaml @@ -505,7 +505,7 @@ definitions: $ref: "#/definitions/GenericResources" GenericResources: - description: "User defined Resources, can be either Integer resources (e.g: SSD=3) or String resources (e.g: GPU={UUID1, UUID2})" + description: "User-defined resources can be either Integer resources (e.g, `SSD=3`) or String resources (e.g, `GPU=UUID1`)" type: "array" items: type: "object" @@ -2021,28 +2021,45 @@ definitions: Version: $ref: "#/definitions/ObjectVersion" CreatedAt: + description: | + Date and time at which the node was added to the swarm in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" format: "dateTime" example: "2016-08-18T10:44:24.496525531Z" UpdatedAt: + description: | + Date and time at which the node was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" format: "dateTime" example: "2017-08-09T07:09:37.632105588Z" Spec: $ref: "#/definitions/NodeSpec" Description: + description: | + Description encapsulates the properties of the Node as reported by the + agent. type: "object" properties: Hostname: type: "string" example: "bf3067039e47" Platform: + description: | + Platform represents the platform (Arch/OS). type: "object" properties: Architecture: + description: | + Architecture represents the hardware architecture (for example, + `x86_64`). type: "string" example: "x86_64" OS: + description: | + OS represents the Operating System (for example, `linux` or + `windows`). type: "string" example: "linux" Resources: @@ -2311,15 +2328,22 @@ definitions: properties: LogDriver: description: | - The log driver to use for tasks created in the orchestrator if unspecified by a service. + The log driver to use for tasks created in the orchestrator if + unspecified by a service. - Updating this value will only have an affect on new tasks. Old tasks will continue use their previously configured log driver until recreated. + Updating this value only affects new tasks. Existing tasks continue + to use their previously configured log driver until recreated. type: "object" properties: Name: + description: | + The log driver to use as a default for new tasks. type: "string" example: "json-file" Options: + description: | + Driver-specific options for the selectd log driver, specified + as key/value pairs. type: "object" additionalProperties: type: "string" @@ -2348,6 +2372,9 @@ definitions: # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but # without `JoinTokens`. ClusterInfo: + description: | + ClusterInfo represents information about the swarm as is returned by the + "/info" endpoint. Join-tokens are not included. type: "object" properties: ID: @@ -2357,10 +2384,16 @@ definitions: Version: $ref: "#/definitions/ObjectVersion" CreatedAt: + description: | + Date and time at which the swarm was initialised in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" format: "dateTime" example: "2016-08-18T10:44:24.496525531Z" UpdatedAt: + description: | + Date and time at which the swarm was last updated in + [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. type: "string" format: "dateTime" example: "2017-08-09T07:09:37.632105588Z" @@ -2522,10 +2555,12 @@ definitions: Hosts: type: "array" description: | - A list of hostnames/IP mappings to add to the container's `/etc/hosts` file. - The format of extra hosts on swarmkit is specified in: - http://man7.org/linux/man-pages/man5/hosts.5.html - IP_address canonical_hostname [aliases...] + A list of hostname/IP mappings to add to the container's `hosts` + file. The format of extra hosts is specified in the + [hosts(5)](http://man7.org/linux/man-pages/man5/hosts.5.html) + man page: + + IP_address canonical_hostname [aliases...] items: type: "string" DNSConfig: @@ -2675,7 +2710,11 @@ definitions: - Spread: SpreadDescriptor: "node.labels.rack" Platforms: - description: "An array of supported platforms." + description: | + Platforms stores all the platforms that the service's image can + run on. This field is used in the platform filter for scheduling. + If empty, then the platform filter is off, meaning there are no + scheduling restrictions. type: "array" items: type: "object" From d3b3ce345c2d9f9bbc9aca4a39a3c3e67ba7aaad Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 10 Aug 2017 20:34:44 +0200 Subject: [PATCH 04/13] Update incorrect types in Swagger - `ObjectVersion.Index` is an `uint64` https://github.com/moby/moby/blob/0fd90c4d5d8ab739d6f999a36d9c4096e89c8059/api/types/swarm/common.go#L5-L15 - `ClusterInfo` is nullable in the `/info` output (see https://github.com/moby/moby/blob/ff4f700f74450018f36d014f3cde0ff1b9c17fb3/api/types/swarm/swarm.go#L203) - `CAConfig.ForceRotate` was missing a type, therefore treated as an `object` in Swagger: https://github.com/moby/moby/blob/ff4f700f74450018f36d014f3cde0ff1b9c17fb3/api/types/swarm/swarm.go#L121 - `Raft.SnapshotInterval`, `Raft.KeepOldSnapshots`, and `Raft.LogEntriesForSlowFollowers` are an `uint64` not an `int64` - Various fields in `swarm.Info` are nullable; added `x-nullable` Signed-off-by: Sebastiaan van Stijn Upstream-commit: 93e324e2a7b8131414382b6fb38b69f0d09bc30c Component: engine --- components/engine/api/swagger.yaml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/components/engine/api/swagger.yaml b/components/engine/api/swagger.yaml index 0ce735f0fb..2037248807 100644 --- a/components/engine/api/swagger.yaml +++ b/components/engine/api/swagger.yaml @@ -1975,7 +1975,7 @@ definitions: properties: Index: type: "integer" - format: "int64" + format: "uint64" example: 373531 NodeSpec: @@ -2227,6 +2227,7 @@ definitions: Orchestration: description: "Orchestration configuration." type: "object" + x-nullable: true properties: TaskHistoryRetentionLimit: description: "The number of historic tasks to keep per instance or node. If negative, never remove completed or failed tasks." @@ -2240,16 +2241,16 @@ definitions: SnapshotInterval: description: "The number of log entries between snapshots." type: "integer" - format: "int64" + format: "uint64" example: 10000 KeepOldSnapshots: description: "The number of snapshots to keep beyond the current snapshot." type: "integer" - format: "int64" + format: "uint64" LogEntriesForSlowFollowers: description: "The number of log entries to keep around to sync up slow followers after a snapshot is created." type: "integer" - format: "int64" + format: "uint64" example: 500 ElectionTick: description: | @@ -2268,6 +2269,7 @@ definitions: Dispatcher: description: "Dispatcher configuration." type: "object" + x-nullable: true properties: HeartbeatPeriod: description: "The delay for an agent to send a heartbeat to the dispatcher." @@ -2277,6 +2279,7 @@ definitions: CAConfig: description: "CA configuration." type: "object" + x-nullable: true properties: NodeCertExpiry: description: "The duration node certificates are issued for." @@ -2314,6 +2317,8 @@ definitions: type: "string" ForceRotate: description: "An integer whose purpose is to force swarm to generate a new signing CA certificate and key, if none have been specified in `SigningCACert` and `SigningCAKey`" + format: "uint64" + type: "integer" EncryptionConfig: description: "Parameters related to encryption-at-rest." type: "object" @@ -2375,6 +2380,7 @@ definitions: description: | ClusterInfo represents information about the swarm as is returned by the "/info" endpoint. Join-tokens are not included. + x-nullable: true type: "object" properties: ID: From 6526a15536e2b8ab2ba7bf7f21cc4a67fd0202fb Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 10 Aug 2017 21:12:36 +0200 Subject: [PATCH 05/13] Fix TLSInfo in Node specification - `TLSInfo` is part of `Node.Description`, but was documented as a direct child of `Node` - `Node.TLSInfo` incorrectly was using the `SwarmSpec` type, instead of `TLSInfo` Signed-off-by: Sebastiaan van Stijn Upstream-commit: b2de157a41bbd18ca4317792614e8630d73a7102 Component: engine --- components/engine/api/swagger.yaml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/components/engine/api/swagger.yaml b/components/engine/api/swagger.yaml index 2037248807..0ae47b37bd 100644 --- a/components/engine/api/swagger.yaml +++ b/components/engine/api/swagger.yaml @@ -2086,7 +2086,7 @@ definitions: Name: type: "string" TLSInfo: - $ref: "#/definitions/SwarmSpec" + $ref: "#/definitions/TLSInfo" example: ID: "24ifsmvkjbyhk" Version: @@ -2158,6 +2158,20 @@ definitions: Name: "localhost:5000/vieux/sshfs:latest" - Type: "Volume" Name: "vieux/sshfs:latest" + TLSInfo: + TrustRoot: | + -----BEGIN CERTIFICATE----- + MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw + EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0 + MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH + A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf + 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB + Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO + PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz + pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H + -----END CERTIFICATE----- + CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" + CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" Status: State: "ready" Addr: "172.17.0.2" @@ -2165,20 +2179,6 @@ definitions: Leader: true Reachability: "reachable" Addr: "172.17.0.2:2377" - TLSInfo: - TrustRoot: | - -----BEGIN CERTIFICATE----- - MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw - EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0 - MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH - A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf - 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB - Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO - PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz - pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H - -----END CERTIFICATE----- - CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" - CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" TLSInfo: description: "Information about the issuer of leaf TLS certificates and the trusted root CA certificate" From 9fee66bce74c5492cca8a42bbee08a7c895d3d92 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 10 Aug 2017 21:24:20 +0200 Subject: [PATCH 06/13] 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" From d0c8aa84bdf9d527e9527f19f5423a231c565cf2 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 10 Aug 2017 21:37:27 +0200 Subject: [PATCH 07/13] Add missing definition for Node.ManagerStatus The `Node.ManagerStatus` property was only present in the example, but not in the definition. This patch adds definitions for `ManagerStatus` and `Reachability`, similar to what is used in the code; https://github.com/moby/moby/blob/f02a5b50c407bdb087388e18e1ac619f2788dd8d/api/types/swarm/node.go#L84-L101 Signed-off-by: Sebastiaan van Stijn Upstream-commit: 3f1ad79faf3bfecc19722eb6541bb415024dafe4 Component: engine --- components/engine/api/swagger.yaml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/components/engine/api/swagger.yaml b/components/engine/api/swagger.yaml index d9704e4420..b91319b7e9 100644 --- a/components/engine/api/swagger.yaml +++ b/components/engine/api/swagger.yaml @@ -2089,6 +2089,8 @@ definitions: $ref: "#/definitions/TLSInfo" Status: $ref: "#/definitions/NodeStatus" + ManagerStatus: + $ref: "#/definitions/ManagerStatus" example: ID: "24ifsmvkjbyhk" Version: @@ -2237,6 +2239,36 @@ definitions: - "disconnected" example: "ready" + ManagerStatus: + description: | + ManagerStatus represents the status of a manager. + + It provides the current status of a node's manager component, if the node + is a manager. + x-nullable: true + type: "object" + properties: + Leader: + type: "boolean" + default: false + example: true + Reachability: + $ref: "#/definitions/Reachability" + Addr: + description: | + The IP address and port at which the manager is reachable. + type: "string" + example: "10.0.0.46:2377" + + Reachability: + description: "Reachability represents the reachability of a node." + type: "string" + enum: + - "unknown" + - "unreachable" + - "reachable" + example: "reachable" + SwarmSpec: description: "User modifiable swarm configuration." type: "object" From 4645cfda2114c085c73e60d7aba7f61b86383001 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 11 Aug 2017 02:09:35 +0200 Subject: [PATCH 08/13] Extract Platform to a separate definition Signed-off-by: Sebastiaan van Stijn Upstream-commit: a2de2681a65d034ffb231b15b630b5a053608331 Component: engine --- components/engine/api/swagger.yaml | 43 +++++++++++++----------------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/components/engine/api/swagger.yaml b/components/engine/api/swagger.yaml index b91319b7e9..d7085f7e3d 100644 --- a/components/engine/api/swagger.yaml +++ b/components/engine/api/swagger.yaml @@ -2046,22 +2046,7 @@ definitions: type: "string" example: "bf3067039e47" Platform: - description: | - Platform represents the platform (Arch/OS). - type: "object" - properties: - Architecture: - description: | - Architecture represents the hardware architecture (for example, - `x86_64`). - type: "string" - example: "x86_64" - OS: - description: | - OS represents the Operating System (for example, `linux` or - `windows`). - type: "string" - example: "linux" + $ref: "#/definitions/Platform" Resources: $ref: "#/definitions/ResourceObject" Engine: @@ -2184,6 +2169,23 @@ definitions: Reachability: "reachable" Addr: "172.17.0.2:2377" + Platform: + description: | + Platform represents the platform (Arch/OS). + type: "object" + properties: + Architecture: + description: | + Architecture represents the hardware architecture (for example, + `x86_64`). + type: "string" + example: "x86_64" + OS: + description: | + OS represents the Operating System (for example, `linux` or `windows`). + type: "string" + example: "linux" + TLSInfo: description: "Information about the issuer of leaf TLS certificates and the trusted root CA certificate" type: "object" @@ -2784,14 +2786,7 @@ definitions: scheduling restrictions. type: "array" items: - type: "object" - properties: - Architecture: - type: "string" - example: "amd64" - OS: - type: "string" - example: "linux" + $ref: "#/definitions/Platform" ForceUpdate: description: "A counter that triggers an update even if no relevant parameters have been changed." type: "integer" From 54e785932e14dee4370ddccead3e7a28fe30b056 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 11 Aug 2017 02:26:01 +0200 Subject: [PATCH 09/13] Extract EngineDescription to a separate definition Signed-off-by: Sebastiaan van Stijn Upstream-commit: 7cb4a97ae195bce55b0a2e54e08b3cd1b4b190af Component: engine --- components/engine/api/swagger.yaml | 81 ++++++++++++++++++++++-------- 1 file changed, 61 insertions(+), 20 deletions(-) diff --git a/components/engine/api/swagger.yaml b/components/engine/api/swagger.yaml index d7085f7e3d..3b86ed59dd 100644 --- a/components/engine/api/swagger.yaml +++ b/components/engine/api/swagger.yaml @@ -2050,26 +2050,7 @@ definitions: Resources: $ref: "#/definitions/ResourceObject" Engine: - type: "object" - properties: - EngineVersion: - type: "string" - example: "17.06.0" - Labels: - type: "object" - additionalProperties: - type: "string" - example: - foo: "bar" - Plugins: - type: "array" - items: - type: "object" - properties: - Type: - type: "string" - Name: - type: "string" + $ref: "#/definitions/EngineDescription" TLSInfo: $ref: "#/definitions/TLSInfo" Status: @@ -2186,6 +2167,66 @@ definitions: type: "string" example: "linux" + EngineDescription: + description: "EngineDescription provides information about an engine." + type: "object" + properties: + EngineVersion: + type: "string" + example: "17.06.0" + Labels: + type: "object" + additionalProperties: + type: "string" + example: + foo: "bar" + Plugins: + type: "array" + items: + type: "object" + properties: + Type: + type: "string" + Name: + type: "string" + example: + - Type: "Log" + Name: "awslogs" + - Type: "Log" + Name: "fluentd" + - Type: "Log" + Name: "gcplogs" + - Type: "Log" + Name: "gelf" + - Type: "Log" + Name: "journald" + - Type: "Log" + Name: "json-file" + - Type: "Log" + Name: "logentries" + - Type: "Log" + Name: "splunk" + - Type: "Log" + Name: "syslog" + - Type: "Network" + Name: "bridge" + - Type: "Network" + Name: "host" + - Type: "Network" + Name: "ipvlan" + - Type: "Network" + Name: "macvlan" + - Type: "Network" + Name: "null" + - Type: "Network" + Name: "overlay" + - Type: "Volume" + Name: "local" + - Type: "Volume" + Name: "localhost:5000/vieux/sshfs:latest" + - Type: "Volume" + Name: "vieux/sshfs:latest" + TLSInfo: description: "Information about the issuer of leaf TLS certificates and the trusted root CA certificate" type: "object" From 3a37403bb91e4e5a2a4d4aa40c3fb0b628eca154 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 11 Aug 2017 02:30:16 +0200 Subject: [PATCH 10/13] Extract NodeDescription to a separate definition Signed-off-by: Sebastiaan van Stijn Upstream-commit: 33e2c994015cbc8f7e86bc1b764e17a7470a17ac Component: engine --- components/engine/api/swagger.yaml | 35 ++++++++++++++++-------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/components/engine/api/swagger.yaml b/components/engine/api/swagger.yaml index 3b86ed59dd..ffe07a3d25 100644 --- a/components/engine/api/swagger.yaml +++ b/components/engine/api/swagger.yaml @@ -2037,22 +2037,7 @@ definitions: Spec: $ref: "#/definitions/NodeSpec" Description: - description: | - Description encapsulates the properties of the Node as reported by the - agent. - type: "object" - properties: - Hostname: - type: "string" - example: "bf3067039e47" - Platform: - $ref: "#/definitions/Platform" - Resources: - $ref: "#/definitions/ResourceObject" - Engine: - $ref: "#/definitions/EngineDescription" - TLSInfo: - $ref: "#/definitions/TLSInfo" + $ref: "#/definitions/NodeDescription" Status: $ref: "#/definitions/NodeStatus" ManagerStatus: @@ -2150,6 +2135,24 @@ definitions: Reachability: "reachable" Addr: "172.17.0.2:2377" + NodeDescription: + description: | + NodeDescription encapsulates the properties of the Node as reported by the + agent. + type: "object" + properties: + Hostname: + type: "string" + example: "bf3067039e47" + Platform: + $ref: "#/definitions/Platform" + Resources: + $ref: "#/definitions/ResourceObject" + Engine: + $ref: "#/definitions/EngineDescription" + TLSInfo: + $ref: "#/definitions/TLSInfo" + Platform: description: | Platform represents the platform (Arch/OS). From 031f55b2f7b23b783c378d2017677c7c9c723145 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 11 Aug 2017 03:23:47 +0200 Subject: [PATCH 11/13] Add definition for Swarm inspect response Also remove inline response examples Signed-off-by: Sebastiaan van Stijn Upstream-commit: 5b017ef45d68748b8f4065db137aa55e1ff0e8ab Component: engine --- components/engine/api/swagger.yaml | 98 ++++++++---------------------- 1 file changed, 26 insertions(+), 72 deletions(-) diff --git a/components/engine/api/swagger.yaml b/components/engine/api/swagger.yaml index ffe07a3d25..d91de0ed4c 100644 --- a/components/engine/api/swagger.yaml +++ b/components/engine/api/swagger.yaml @@ -2462,24 +2462,6 @@ definitions: example: "max-file": "10" "max-size": "100m" - example: - Name: "default" - Orchestration: - TaskHistoryRetentionLimit: 10 - Raft: - SnapshotInterval: 10000 - LogEntriesForSlowFollowers: 500 - HeartbeatTick: 1 - ElectionTick: 3 - Dispatcher: - HeartbeatPeriod: 5000000000 - CAConfig: - NodeCertExpiry: 7776000000000000 - JoinTokens: - Worker: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx" - Manager: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" - EncryptionConfig: - AutoLockManagers: false # The Swarm information for `GET /info`. It is the same as `GET /swarm`, but # without `JoinTokens`. @@ -2519,6 +2501,31 @@ definitions: type: "boolean" example: false + JoinTokens: + description: | + JoinTokens contains the tokens workers and managers need to join the swarm. + type: "object" + properties: + Worker: + description: | + The token workers can use to join the swarm. + type: "string" + example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-1awxwuwd3z9j1z3puu7rcgdbx" + Manager: + description: | + The token managers can use to join the swarm. + type: "string" + example: "SWMTKN-1-3pu6hszjas19xyp7ghgosyx9k8atbfcr8p2is99znpy26u2lkl-7p73s1dx5in4tatdymyhg9hu2" + + Swarm: + type: "object" + allOf: + - $ref: "#/definitions/ClusterInfo" + - type: "object" + properties: + JoinTokens: + $ref: "#/definitions/JoinTokens" + TaskSpec: description: "User modifiable task configuration." type: "object" @@ -7999,60 +8006,7 @@ paths: 200: description: "no error" schema: - allOf: - - $ref: "#/definitions/ClusterInfo" - - type: "object" - properties: - JoinTokens: - description: "The tokens workers and managers need to join the swarm." - type: "object" - properties: - Worker: - description: "The token workers can use to join the swarm." - type: "string" - Manager: - description: "The token managers can use to join the swarm." - type: "string" - example: - CreatedAt: "2016-08-15T16:00:20.349727406Z" - Spec: - Dispatcher: - HeartbeatPeriod: 5000000000 - Orchestration: - TaskHistoryRetentionLimit: 10 - CAConfig: - NodeCertExpiry: 7776000000000000 - Raft: - LogEntriesForSlowFollowers: 500 - HeartbeatTick: 1 - SnapshotInterval: 10000 - ElectionTick: 3 - TaskDefaults: {} - EncryptionConfig: - AutoLockManagers: false - Name: "default" - JoinTokens: - Worker: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-6qmn92w6bu3jdvnglku58u11a" - Manager: "SWMTKN-1-1h8aps2yszaiqmz2l3oc5392pgk8e49qhx2aj3nyv0ui0hez2a-8llk83c4wm9lwioey2s316r9l" - ID: "70ilmkj2f6sp2137c753w2nmt" - UpdatedAt: "2016-08-15T16:32:09.623207604Z" - Version: - Index: 51 - RootRotationInProgress: false - TLSInfo: - TrustRoot: | - -----BEGIN CERTIFICATE----- - MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw - EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0 - MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH - A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf - 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB - Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO - PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz - pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H - -----END CERTIFICATE----- - CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" - CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" + $ref: "#/definitions/Swarm" 404: description: "no such swarm" schema: From 81aceb39fbb4cafc5cd21621497ea4c7bd530ed6 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 11 Aug 2017 03:29:26 +0200 Subject: [PATCH 12/13] Remove redundant example for Node All example values are now documented per field, so are automatically used to generate responses. Signed-off-by: Sebastiaan van Stijn Upstream-commit: 2720cefbb2eaac9f440cd7c1807b4222b18ee0c4 Component: engine --- components/engine/api/swagger.yaml | 92 ------------------------------ 1 file changed, 92 deletions(-) diff --git a/components/engine/api/swagger.yaml b/components/engine/api/swagger.yaml index d91de0ed4c..36724c3f08 100644 --- a/components/engine/api/swagger.yaml +++ b/components/engine/api/swagger.yaml @@ -2042,98 +2042,6 @@ definitions: $ref: "#/definitions/NodeStatus" ManagerStatus: $ref: "#/definitions/ManagerStatus" - example: - ID: "24ifsmvkjbyhk" - Version: - Index: 8 - CreatedAt: "2016-06-07T20:31:11.853781916Z" - UpdatedAt: "2016-06-07T20:31:11.999868824Z" - Spec: - Name: "my-node" - Role: "manager" - Availability: "active" - Labels: - foo: "bar" - Description: - Hostname: "bf3067039e47" - Platform: - Architecture: "x86_64" - OS: "linux" - Resources: - NanoCPUs: 4000000000 - MemoryBytes: 8272408576 - GenericResources: - - DiscreteResourceSpec: - Kind: "SSD" - Value: 3 - - NamedResourceSpec: - Kind: "GPU" - Value: "UUID1" - - NamedResourceSpec: - Kind: "GPU" - Value: "UUID2" - Engine: - EngineVersion: "17.04.0" - Labels: - foo: "bar" - Plugins: - - Type: "Log" - Name: "awslogs" - - Type: "Log" - Name: "fluentd" - - Type: "Log" - Name: "gcplogs" - - Type: "Log" - Name: "gelf" - - Type: "Log" - Name: "journald" - - Type: "Log" - Name: "json-file" - - Type: "Log" - Name: "logentries" - - Type: "Log" - Name: "splunk" - - Type: "Log" - Name: "syslog" - - Type: "Network" - Name: "bridge" - - Type: "Network" - Name: "host" - - Type: "Network" - Name: "ipvlan" - - Type: "Network" - Name: "macvlan" - - Type: "Network" - Name: "null" - - Type: "Network" - Name: "overlay" - - Type: "Volume" - Name: "local" - - Type: "Volume" - Name: "localhost:5000/vieux/sshfs:latest" - - Type: "Volume" - Name: "vieux/sshfs:latest" - TLSInfo: - TrustRoot: | - -----BEGIN CERTIFICATE----- - MIIBajCCARCgAwIBAgIUbYqrLSOSQHoxD8CwG6Bi2PJi9c8wCgYIKoZIzj0EAwIw - EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwNDI0MjE0MzAwWhcNMzcwNDE5MjE0 - MzAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH - A0IABJk/VyMPYdaqDXJb/VXh5n/1Yuv7iNrxV3Qb3l06XD46seovcDWs3IZNV1lf - 3Skyr0ofcchipoiHkXBODojJydSjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB - Af8EBTADAQH/MB0GA1UdDgQWBBRUXxuRcnFjDfR/RIAUQab8ZV/n4jAKBggqhkjO - PQQDAgNIADBFAiAy+JTe6Uc3KyLCMiqGl2GyWGQqQDEcO3/YG36x7om65AIhAJvz - pxv6zFeVEkAEEkqIYi0omA9+CjanB/6Bz4n1uw8H - -----END CERTIFICATE----- - CertIssuerSubject: "MBMxETAPBgNVBAMTCHN3YXJtLWNh" - CertIssuerPublicKey: "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEmT9XIw9h1qoNclv9VeHmf/Vi6/uI2vFXdBveXTpcPjqx6i9wNazchk1XWV/dKTKvSh9xyGKmiIeRcE4OiMnJ1A==" - Status: - State: "ready" - Addr: "172.17.0.2" - ManagerStatus: - Leader: true - Reachability: "reachable" - Addr: "172.17.0.2:2377" NodeDescription: description: | From ee29bacf1d5e196248db73698fcf10903563e87e Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 11 Aug 2017 15:45:17 +0200 Subject: [PATCH 13/13] Create definition for SystemInfo response The `/info` endpoint was badly documented, missing various fields and incorrectly describing others. This patch defines a type for the endpoint, based on the API types in the source. Also removing the response example in favor of per-field examples, as this prevents an incorrectly formatted response from masking omissions in the actual type. Signed-off-by: Sebastiaan van Stijn Upstream-commit: 18b23067be82054a6384fc5934ecbb0276d1862b Component: engine --- components/engine/api/swagger.yaml | 972 +++++++++++++++++++++++------ 1 file changed, 769 insertions(+), 203 deletions(-) diff --git a/components/engine/api/swagger.yaml b/components/engine/api/swagger.yaml index 36724c3f08..58d4556fd2 100644 --- a/components/engine/api/swagger.yaml +++ b/components/engine/api/swagger.yaml @@ -3357,6 +3357,774 @@ definitions: Spec: $ref: "#/definitions/ConfigSpec" + SystemInfo: + type: "object" + properties: + ID: + description: | + Unique identifier of the daemon. + +


+ + > **Note**: The format of the ID itself is not part of the API, and + > should not be considered stable. + type: "string" + example: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS" + Containers: + description: "Total number of containers on the host." + type: "integer" + example: 14 + ContainersRunning: + description: | + Number of containers with status `"running"`. + type: "integer" + example: 3 + ContainersPaused: + description: | + Number of containers with status `"paused"`. + type: "integer" + example: 1 + ContainersStopped: + description: | + Number of containers with status `"stopped"`. + type: "integer" + example: 10 + Images: + description: | + Total number of images on the host. + + Both _tagged_ and _untagged_ (dangling) images are counted. + type: "integer" + example: 508 + Driver: + description: "Name of the storage driver in use." + type: "string" + example: "overlay2" + DriverStatus: + description: | + Information specific to the storage driver, provided as + "label" / "value" pairs. + + This information is provided by the storage driver, and formatted + in a way consistent with the output of `docker info` on the command + line. + +


+ + > **Note**: The information returned in this field, including the + > formatting of values and labels, should not be considered stable, + > and may change without notice. + type: "array" + items: + type: "array" + items: + type: "string" + example: + - ["Backing Filesystem", "extfs"] + - ["Supports d_type", "true"] + - ["Native Overlay Diff", "true"] + DockerRootDir: + description: | + Root directory of persistent Docker state. + + Defaults to `/var/lib/docker` on Linux, and `C:\ProgramData\docker` + on Windows. + type: "string" + example: "/var/lib/docker" + SystemStatus: + description: | + Status information about this node (standalone Swarm API). + +


+ + > **Note**: The information returned in this field is only propagated + > by the Swarm standalone API, and is empty (`null`) when using + > built-in swarm mode. + type: "array" + items: + type: "array" + items: + type: "string" + example: + - ["Role", "primary"] + - ["State", "Healthy"] + - ["Strategy", "spread"] + - ["Filters", "health, port, containerslots, dependency, affinity, constraint, whitelist"] + - ["Nodes", "2"] + - [" swarm-agent-00", "192.168.99.102:2376"] + - [" └ ID", "5CT6:FBGO:RVGO:CZL4:PB2K:WCYN:2JSV:KSHH:GGFW:QOPG:6J5Q:IOZ2|192.168.99.102:2376"] + - [" └ Status", "Healthy"] + - [" └ Containers", "1 (1 Running, 0 Paused, 0 Stopped)"] + - [" └ Reserved CPUs", "0 / 1"] + - [" └ Reserved Memory", "0 B / 1.021 GiB"] + - [" └ Labels", "kernelversion=4.4.74-boot2docker, operatingsystem=Boot2Docker 17.06.0-ce (TCL 7.2); HEAD : 0672754 - Thu Jun 29 00:06:31 UTC 2017, ostype=linux, provider=virtualbox, storagedriver=aufs"] + - [" └ UpdatedAt", "2017-08-09T10:03:46Z"] + - [" └ ServerVersion", "17.06.0-ce"] + - [" swarm-manager", "192.168.99.101:2376"] + - [" └ ID", "TAMD:7LL3:SEF7:LW2W:4Q2X:WVFH:RTXX:JSYS:XY2P:JEHL:ZMJK:JGIW|192.168.99.101:2376"] + - [" └ Status", "Healthy"] + - [" └ Containers", "2 (2 Running, 0 Paused, 0 Stopped)"] + - [" └ Reserved CPUs", "0 / 1"] + - [" └ Reserved Memory", "0 B / 1.021 GiB"] + - [" └ Labels", "kernelversion=4.4.74-boot2docker, operatingsystem=Boot2Docker 17.06.0-ce (TCL 7.2); HEAD : 0672754 - Thu Jun 29 00:06:31 UTC 2017, ostype=linux, provider=virtualbox, storagedriver=aufs"] + - [" └ UpdatedAt", "2017-08-09T10:04:11Z"] + - [" └ ServerVersion", "17.06.0-ce"] + Plugins: + $ref: "#/definitions/PluginsInfo" + MemoryLimit: + description: "Indicates if the host has memory limit support enabled." + type: "boolean" + example: true + SwapLimit: + description: "Indicates if the host has memory swap limit support enabled." + type: "boolean" + example: true + KernelMemory: + description: "Indicates if the host has kernel memory limit support enabled." + type: "boolean" + example: true + CpuCfsPeriod: + description: "Indicates if CPU CFS(Completely Fair Scheduler) period is supported by the host." + type: "boolean" + example: true + CpuCfsQuota: + description: "Indicates if CPU CFS(Completely Fair Scheduler) quota is supported by the host." + type: "boolean" + example: true + CPUShares: + description: "Indicates if CPU Shares limiting is supported by the host." + type: "boolean" + example: true + CPUSet: + description: | + Indicates if CPUsets (cpuset.cpus, cpuset.mems) are supported by the host. + + See [cpuset(7)](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt) + type: "boolean" + example: true + OomKillDisable: + description: "Indicates if OOM killer disable is supported on the host." + type: "boolean" + IPv4Forwarding: + description: "Indicates IPv4 forwarding is enabled." + type: "boolean" + example: true + BridgeNfIptables: + description: "Indicates if `bridge-nf-call-iptables` is available on the host." + type: "boolean" + example: true + BridgeNfIp6tables: + description: "Indicates if `bridge-nf-call-ip6tables` is available on the host." + type: "boolean" + example: true + Debug: + description: "Indicates if the daemon is running in debug-mode / with debug-level logging enabled." + type: "boolean" + example: true + NFd: + description: | + The total number of file Descriptors in use by the daemon process. + + This information is only returned if debug-mode is enabled. + type: "integer" + example: 64 + NGoroutines: + description: | + The number of goroutines that currently exist. + + This information is only returned if debug-mode is enabled. + type: "integer" + example: 174 + SystemTime: + description: | + Current system-time in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) + format with nano-seconds. + type: "string" + example: "2017-08-08T20:28:29.06202363Z" + LoggingDriver: + description: | + The logging driver to use as a default for new containers. + type: "string" + CgroupDriver: + description: | + The driver to use for managing cgroups. + type: "string" + enum: ["cgroupfs", "systemd"] + default: "cgroupfs" + example: "cgroupfs" + NEventsListener: + description: "Number of event listeners subscribed." + type: "integer" + example: 30 + KernelVersion: + description: | + Kernel version of the host. + + On Linux, this information obtained from `uname`. On Windows this + information is queried from the HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\ + registry value, for example _"10.0 14393 (14393.1198.amd64fre.rs1_release_sec.170427-1353)"_. + type: "string" + example: "4.9.38-moby" + OperatingSystem: + description: | + Name of the host's operating system, for example: "Ubuntu 16.04.2 LTS" + or "Windows Server 2016 Datacenter" + type: "string" + example: "Alpine Linux v3.5" + OSType: + description: | + Generic type of the operating system of the host, as returned by the + Go runtime (`GOOS`). + + Currently returned values are "linux" and "windows". A full list of + possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment). + type: "string" + example: "linux" + Architecture: + description: | + Hardware architecture of the host, as returned by the Go runtime + (`GOARCH`). + + A full list of possible values can be found in the [Go documentation](https://golang.org/doc/install/source#environment). + type: "string" + example: "x86_64" + NCPU: + description: | + The number of logical CPUs usable by the daemon. + + The number of available CPUs is checked by querying the operating + system when the daemon starts. Changes to operating system CPU + allocation after the daemon is started are not reflected. + type: "integer" + example: 4 + MemTotal: + description: | + Total amount of physical memory available on the host, in kilobytes (kB). + type: "integer" + format: "int64" + example: 2095882240 + + IndexServerAddress: + description: | + Address / URL of the index server that is used for image search, + and as a default for user authentication for Docker Hub and Docker Cloud. + default: "https://index.docker.io/v1/" + type: "string" + example: "https://index.docker.io/v1/" + RegistryConfig: + $ref: "#/definitions/RegistryServiceConfig" + GenericResources: + $ref: "#/definitions/GenericResources" + HttpProxy: + description: | + HTTP-proxy configured for the daemon. This value is obtained from the + [`HTTP_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + + Containers do not automatically inherit this configuration. + type: "string" + example: "http://user:pass@proxy.corp.example.com:8080" + HttpsProxy: + description: | + HTTPS-proxy configured for the daemon. This value is obtained from the + [`HTTPS_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) environment variable. + + Containers do not automatically inherit this configuration. + type: "string" + example: "https://user:pass@proxy.corp.example.com:4443" + NoProxy: + description: | + Comma-separated list of domain extensions for which no proxy should be + used. This value is obtained from the [`NO_PROXY`](https://www.gnu.org/software/wget/manual/html_node/Proxies.html) + environment variable. + + Containers do not automatically inherit this configuration. + type: "string" + example: "*.local, 169.254/16" + Name: + description: "Hostname of the host." + type: "string" + example: "node5.corp.example.com" + Labels: + description: | + User-defined labels (key/value metadata) as set on the daemon. + +


+ + > **Note**: When part of a Swarm, nodes can both have _daemon_ labels, + > set through the daemon configuration, and _node_ labels, set from a + > manager node in the Swarm. Node labels are not included in this + > field. Node labels can be retrieved using the `/nodes/(id)` endpoint + > on a manager node in the Swarm. + type: "array" + items: + type: "string" + example: ["storage=ssd", "production"] + ExperimentalBuild: + description: | + Indicates if experimental features are enabled on the daemon. + type: "boolean" + example: true + ServerVersion: + description: | + Version string of the daemon. + + > **Note**: the [standalone Swarm API](https://docs.docker.com/swarm/swarm-api/) + > returns the Swarm version instead of the daemon version, for example + > `swarm/1.2.8`. + type: "string" + example: "17.06.0-ce" + ClusterStore: + description: | + URL of the distributed storage backend. + + + The storage backend is used for multihost networking (to store + network and endpoint information) and by the node discovery mechanism. + +


+ + > **Note**: This field is only propagated when using standalone Swarm + > mode, and overlay networking using an external k/v store. Overlay + > networks with Swarm mode enabled use the built-in raft store, and + > this field will be empty. + type: "string" + example: "consul://consul.corp.example.com:8600/some/path" + ClusterAdvertise: + description: | + The network endpoint that the Engine advertises for the purpose of + node discovery. ClusterAdvertise is a `host:port` combination on which + the daemon is reachable by other hosts. + +


+ + > **Note**: This field is only propagated when using standalone Swarm + > mode, and overlay networking using an external k/v store. Overlay + > networks with Swarm mode enabled use the built-in raft store, and + > this field will be empty. + type: "string" + example: "node5.corp.example.com:8000" + Runtimes: + description: | + List of [OCI compliant](https://github.com/opencontainers/runtime-spec) + runtimes configured on the daemon. Keys hold the "name" used to + reference the runtime. + + The Docker daemon relies on an OCI compliant runtime (invoked via the + `containerd` daemon) as its interface to the Linux kernel namespaces, + cgroups, and SELinux. + + The default runtime is `runc`, and automatically configured. Additional + runtimes can be configured by the user and will be listed here. + type: "object" + additionalProperties: + $ref: "#/definitions/Runtime" + default: + runc: + path: "docker-runc" + example: + runc: + path: "docker-runc" + runc-master: + path: "/go/bin/runc" + custom: + path: "/usr/local/bin/my-oci-runtime" + runtimeArgs: ["--debug", "--systemd-cgroup=false"] + DefaultRuntime: + description: | + Name of the default OCI runtime that is used when starting containers. + + The default can be overridden per-container at create time. + type: "string" + default: "runc" + example: "runc" + Swarm: + $ref: "#/definitions/SwarmInfo" + LiveRestoreEnabled: + description: | + Indicates if live restore is enabled. + + If enabled, containers are kept running when the daemon is shutdown + or upon daemon start if running containers are detected. + type: "boolean" + default: false + example: false + Isolation: + description: | + Represents the isolation technology to use as a default for containers. + The supported values are platform-specific. + + If no isolation value is specified on daemon start, on Windows client, + the default is `hyperv`, and on Windows server, the default is `process`. + + This option is currently not used on other platforms. + default: "default" + type: "string" + enum: + - "default" + - "hyperv" + - "process" + InitBinary: + description: | + Name and, optional, path of the the `docker-init` binary. + + If the path is omitted, the daemon searches the host's `$PATH` for the + binary and uses the first result. + type: "string" + example: "docker-init" + ContainerdCommit: + $ref: "#/definitions/Commit" + RuncCommit: + $ref: "#/definitions/Commit" + InitCommit: + $ref: "#/definitions/Commit" + SecurityOptions: + description: | + List of security features that are enabled on the daemon, such as + apparmor, seccomp, SELinux, and user-namespaces (userns). + + Additional configuration options for each security feature may + be present, and are included as a comma-separated list of key/value + pairs. + type: "array" + items: + type: "string" + example: + - "name=apparmor" + - "name=seccomp,profile=default" + - "name=selinux" + - "name=userns" + + + # PluginsInfo is a temp struct holding Plugins name + # registered with docker daemon. It is used by Info struct + PluginsInfo: + description: | + Available plugins per type. + +


+ + > **Note**: Only unmanaged (V1) plugins are included in this list. + > V1 plugins are "lazily" loaded, and are not returned in this list + > if there is no resource using the plugin. + type: "object" + properties: + Volume: + description: "Names of available volume-drivers, and network-driver plugins." + type: "array" + items: + type: "string" + example: ["local"] + Network: + description: "Names of available network-drivers, and network-driver plugins." + type: "array" + items: + type: "string" + example: ["bridge", "host", "ipvlan", "macvlan", "null", "overlay"] + Authorization: + description: "Names of available authorization plugins." + type: "array" + items: + type: "string" + example: ["img-authz-plugin", "hbm"] + Log: + description: "Names of available logging-drivers, and logging-driver plugins." + type: "array" + items: + type: "string" + example: ["awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "logentries", "splunk", "syslog"] + + + RegistryServiceConfig: + description: | + RegistryServiceConfig stores daemon registry services configuration. + type: "object" + x-nullable: true + properties: + AllowNondistributableArtifactsCIDRs: + description: | + List of IP ranges to which nondistributable artifacts can be pushed, + using the CIDR syntax [RFC 4632](https://tools.ietf.org/html/4632). + + Some images (for example, Windows base images) contain artifacts + whose distribution is restricted by license. When these images are + pushed to a registry, restricted artifacts are not included. + + This configuration override this behavior, and enables the daemon to + push nondistributable artifacts to all registries whose resolved IP + address is within the subnet described by the CIDR syntax. + + This option is useful when pushing images containing + nondistributable artifacts to a registry on an air-gapped network so + hosts on that network can pull the images without connecting to + another server. + + > **Warning**: Nondistributable artifacts typically have restrictions + > on how and where they can be distributed and shared. Only use this + > feature to push artifacts to private registries and ensure that you + > are in compliance with any terms that cover redistributing + > nondistributable artifacts. + + type: "array" + items: + type: "string" + example: ["::1/128", "127.0.0.0/8"] + AllowNondistributableArtifactsHostnames: + description: | + List of registry hostnames to which nondistributable artifacts can be + pushed, using the format `[:]` or `[:]`. + + Some images (for example, Windows base images) contain artifacts + whose distribution is restricted by license. When these images are + pushed to a registry, restricted artifacts are not included. + + This configuration override this behavior for the specified + registries. + + This option is useful when pushing images containing + nondistributable artifacts to a registry on an air-gapped network so + hosts on that network can pull the images without connecting to + another server. + + > **Warning**: Nondistributable artifacts typically have restrictions + > on how and where they can be distributed and shared. Only use this + > feature to push artifacts to private registries and ensure that you + > are in compliance with any terms that cover redistributing + > nondistributable artifacts. + type: "array" + items: + type: "string" + example: ["registry.internal.corp.example.com:3000", "[2001:db8:a0b:12f0::1]:443"] + InsecureRegistryCIDRs: + description: | + List of IP ranges of insecure registries, using the CIDR syntax + ([RFC 4632](https://tools.ietf.org/html/4632)). Insecure registries + accept un-encrypted (HTTP) and/or untrusted (HTTPS with certificates + from unknown CAs) communication. + + By default, local registries (`127.0.0.0/8`) are configured as + insecure. All other registries are secure. Communicating with an + insecure registry is not possible if the daemon assumes that registry + is secure. + + This configuration override this behavior, insecure communication with + registries whose resolved IP address is within the subnet described by + the CIDR syntax. + + Registries can also be marked insecure by hostname. Those registries + are listed under `IndexConfigs` and have their `Secure` field set to + `false`. + + > **Warning**: Using this option can be useful when running a local + > registry, but introduces security vulnerabilities. This option + > should therefore ONLY be used for testing purposes. For increased + > security, users should add their CA to their system's list of trusted + > CAs instead of enabling this option. + type: "array" + items: + type: "string" + example: ["::1/128", "127.0.0.0/8"] + IndexConfigs: + type: "object" + additionalProperties: + $ref: "#/definitions/IndexInfo" + example: + "127.0.0.1:5000": + "Name": "127.0.0.1:5000" + "Mirrors": [] + "Secure": false + "Official": false + "[2001:db8:a0b:12f0::1]:80": + "Name": "[2001:db8:a0b:12f0::1]:80" + "Mirrors": [] + "Secure": false + "Official": false + "docker.io": + Name: "docker.io" + Mirrors: ["https://hub-mirror.corp.example.com:5000/"] + Secure: true + Official: true + "registry.internal.corp.example.com:3000": + Name: "registry.internal.corp.example.com:3000" + Mirrors: [] + Secure: false + Official: false + Mirrors: + description: | + List of registry URLs that act as a mirror for the official + (`docker.io`) registry. + + type: "array" + items: + type: "string" + example: + - "https://hub-mirror.corp.example.com:5000/" + - "https://[2001:db8:a0b:12f0::1]/" + + IndexInfo: + description: + IndexInfo contains information about a registry. + type: "object" + x-nullable: true + properties: + Name: + description: | + Name of the registry, such as "docker.io". + type: "string" + example: "docker.io" + Mirrors: + description: | + List of mirrors, expressed as URIs. + type: "array" + items: + type: "string" + example: + - "https://hub-mirror.corp.example.com:5000/" + - "https://registry-2.docker.io/" + - "https://registry-3.docker.io/" + Secure: + description: | + Indicates if the the registry is part of the list of insecure + registries. + + If `false`, the registry is insecure. Insecure registries accept + un-encrypted (HTTP) and/or untrusted (HTTPS with certificates from + unknown CAs) communication. + + > **Warning**: Insecure registries can be useful when running a local + > registry. However, because its use creates security vulnerabilities + > it should ONLY be enabled for testing purposes. For increased + > security, users should add their CA to their system's list of + > trusted CAs instead of enabling this option. + type: "boolean" + example: true + Official: + description: | + Indicates whether this is an official registry (i.e., Docker Hub / docker.io) + type: "boolean" + example: true + + Runtime: + description: | + Runtime describes an [OCI compliant](https://github.com/opencontainers/runtime-spec) + runtime. + + The runtime is invoked by the daemon via the `containerd` daemon. OCI + runtimes act as an interface to the Linux kernel namespaces, cgroups, + and SELinux. + type: "object" + properties: + path: + description: | + Name and, optional, path, of the OCI executable binary. + + If the path is omitted, the daemon searches the host's `$PATH` for the + binary and uses the first result. + type: "string" + example: "/usr/local/bin/my-oci-runtime" + runtimeArgs: + description: | + List of command-line arguments to pass to the runtime when invoked. + type: "array" + x-nullable: true + items: + type: "string" + example: ["--debug", "--systemd-cgroup=false"] + + Commit: + description: | + Commit holds the Git-commit (SHA1) that a binary was built from, as + reported in the version-string of external tools, such as `containerd`, + or `runC`. + type: "object" + properties: + ID: + description: "Actual commit ID of external tool." + type: "string" + example: "cfb82a876ecc11b5ca0977d1733adbe58599088a" + Expected: + description: | + Commit ID of external tool expected by dockerd as set at build time. + type: "string" + example: "2d41c047c83e09a6d61d464906feb2a2f3c52aa4" + + SwarmInfo: + description: | + Represents generic information about swarm. + type: "object" + properties: + NodeID: + description: "Unique identifier of for this node in the swarm." + type: "string" + default: "" + example: "k67qz4598weg5unwwffg6z1m1" + NodeAddr: + description: | + IP address at which this node can be reached by other nodes in the + swarm. + type: "string" + default: "" + example: "10.0.0.46" + LocalNodeState: + $ref: "#/definitions/LocalNodeState" + ControlAvailable: + type: "boolean" + default: false + example: true + Error: + type: "string" + default: "" + RemoteManagers: + description: | + List of ID's and addresses of other managers in the swarm. + type: "array" + default: null + x-nullable: true + items: + $ref: "#/definitions/PeerNode" + example: + - NodeID: "71izy0goik036k48jg985xnds" + Addr: "10.0.0.158:2377" + - NodeID: "79y6h1o4gv8n120drcprv5nmc" + Addr: "10.0.0.159:2377" + - NodeID: "k67qz4598weg5unwwffg6z1m1" + Addr: "10.0.0.46:2377" + Nodes: + description: "Total number of nodes in the swarm." + type: "integer" + x-nullable: true + example: 4 + Managers: + description: "Total number of managers in the swarm." + type: "integer" + x-nullable: true + example: 3 + Cluster: + $ref: "#/definitions/ClusterInfo" + + LocalNodeState: + description: "Current local status of this node." + type: "string" + default: "" + enum: + - "" + - "inactive" + - "pending" + - "active" + - "error" + - "locked" + example: "active" + + PeerNode: + description: "Represents a peer-node in the swarm" + properties: + NodeID: + description: "Unique identifier of for this node in the swarm." + type: "string" + Addr: + description: | + IP address and ports at which this node can be reached. + type: "string" + paths: /containers/json: get: @@ -5941,209 +6709,7 @@ paths: 200: description: "No error" schema: - type: "object" - properties: - Architecture: - type: "string" - Containers: - type: "integer" - ContainersRunning: - type: "integer" - ContainersStopped: - type: "integer" - ContainersPaused: - type: "integer" - CpuCfsPeriod: - type: "boolean" - CpuCfsQuota: - type: "boolean" - Debug: - type: "boolean" - DiscoveryBackend: - type: "string" - DockerRootDir: - type: "string" - Driver: - type: "string" - DriverStatus: - type: "array" - items: - type: "array" - items: - type: "string" - SystemStatus: - type: "array" - items: - type: "array" - items: - type: "string" - Plugins: - type: "object" - properties: - Volume: - type: "array" - items: - type: "string" - Network: - type: "array" - items: - type: "string" - Log: - type: "array" - items: - type: "string" - ExperimentalBuild: - type: "boolean" - HttpProxy: - type: "string" - HttpsProxy: - type: "string" - ID: - type: "string" - IPv4Forwarding: - type: "boolean" - Images: - type: "integer" - IndexServerAddress: - type: "string" - InitPath: - type: "string" - InitSha1: - type: "string" - KernelVersion: - type: "string" - Labels: - type: "array" - items: - type: "string" - MemTotal: - type: "integer" - GenericResources: - $ref: "#/definitions/GenericResources" - MemoryLimit: - type: "boolean" - NCPU: - type: "integer" - NEventsListener: - type: "integer" - NFd: - type: "integer" - NGoroutines: - type: "integer" - Name: - type: "string" - NoProxy: - type: "string" - OomKillDisable: - type: "boolean" - OSType: - type: "string" - OomScoreAdj: - type: "integer" - OperatingSystem: - type: "string" - RegistryConfig: - type: "object" - properties: - IndexConfigs: - type: "object" - additionalProperties: - type: "object" - properties: - Mirrors: - type: "array" - items: - type: "string" - Name: - type: "string" - Official: - type: "boolean" - Secure: - type: "boolean" - InsecureRegistryCIDRs: - type: "array" - items: - type: "string" - SwapLimit: - type: "boolean" - SystemTime: - type: "string" - ServerVersion: - type: "string" - examples: - application/json: - Architecture: "x86_64" - ClusterStore: "etcd://localhost:2379" - CgroupDriver: "cgroupfs" - Containers: 11 - ContainersRunning: 7 - ContainersStopped: 3 - ContainersPaused: 1 - CpuCfsPeriod: true - CpuCfsQuota: true - Debug: false - DockerRootDir: "/var/lib/docker" - Driver: "btrfs" - DriverStatus: - - - - "" - ExperimentalBuild: false - HttpProxy: "http://test:test@localhost:8080" - HttpsProxy: "https://test:test@localhost:8080" - ID: "7TRN:IPZB:QYBB:VPBQ:UMPP:KARE:6ZNR:XE6T:7EWV:PKF4:ZOJD:TPYS" - IPv4Forwarding: true - Images: 16 - IndexServerAddress: "https://index.docker.io/v1/" - InitPath: "/usr/bin/docker" - InitSha1: "" - KernelMemory: true - KernelVersion: "3.12.0-1-amd64" - Labels: - - "storage=ssd" - MemTotal: 2099236864 - MemoryLimit: true - NCPU: 1 - NEventsListener: 0 - NFd: 11 - NGoroutines: 21 - Name: "prod-server-42" - NoProxy: "9.81.1.160" - OomKillDisable: true - OSType: "linux" - OperatingSystem: "Boot2Docker" - Plugins: - Volume: - - "local" - Network: - - "null" - - "host" - - "bridge" - RegistryConfig: - IndexConfigs: - docker.io: - Name: "docker.io" - Official: true - Secure: true - InsecureRegistryCIDRs: - - "127.0.0.0/8" - SecurityOptions: - - Key: "Name" - Value: "seccomp" - - Key: "Profile" - Value: "default" - - Key: "Name" - Value: "apparmor" - - Key: "Name" - Value: "selinux" - - Key: "Name" - Value: "userns" - ServerVersion: "1.9.0" - SwapLimit: false - SystemStatus: - - - - "State" - - "Healthy" - SystemTime: "2015-03-10T11:11:23.730591467-07:00" + $ref: "#/definitions/SystemInfo" 500: description: "Server error" schema: