Commit graph

294 commits

Author SHA1 Message Date
Sebastiaan van Stijn
18b23067be
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 <github@gone.nl>
2017-08-16 11:11:29 +02:00
Sebastiaan van Stijn
2720cefbb2
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 <github@gone.nl>
2017-08-16 11:11:19 +02:00
Sebastiaan van Stijn
5b017ef45d
Add definition for Swarm inspect response
Also remove inline response examples

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-16 11:11:14 +02:00
Sebastiaan van Stijn
33e2c99401
Extract NodeDescription to a separate definition
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-16 11:11:09 +02:00
Sebastiaan van Stijn
7cb4a97ae1
Extract EngineDescription to a separate definition
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-16 11:11:04 +02:00
Sebastiaan van Stijn
a2de2681a6
Extract Platform to a separate definition
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-16 11:10:58 +02:00
Sebastiaan van Stijn
3f1ad79faf
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;
f02a5b50c4/api/types/swarm/node.go (L84-L101)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-16 11:10:53 +02:00
Sebastiaan van Stijn
26b247e706
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;

- f02a5b50c4/api/types/swarm/node.go (L77-L82)
- f02a5b50c4/api/types/swarm/node.go (L103-L115)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-16 11:10:47 +02:00
Sebastiaan van Stijn
b2de157a41
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 <github@gone.nl>
2017-08-16 11:10:42 +02:00
Sebastiaan van Stijn
93e324e2a7
Update incorrect types in Swagger
- `ObjectVersion.Index` is an `uint64` 0fd90c4d5d/api/types/swarm/common.go (L5-L15)
- `ClusterInfo` is nullable in the `/info` output (see ff4f700f74/api/types/swarm/swarm.go (L203))
- `CAConfig.ForceRotate` was missing a type, therefore treated as an `object` in Swagger: ff4f700f74/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 <github@gone.nl>
2017-08-16 11:10:32 +02:00
Sebastiaan van Stijn
934378bee3
Update / add extra description fields to Swagger
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-16 11:10:27 +02:00
Sebastiaan van Stijn
fa05a53426
Add extra example values to definitions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-16 11:10:22 +02:00
Sebastiaan van Stijn
f720f9cc33
Reformat definitions - add some whitespace
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-16 11:10:14 +02:00
Brian Goff
ebcb7d6b40 Remove string checking in API error handling
Use strongly typed errors to set HTTP status codes.
Error interfaces are defined in the api/errors package and errors
returned from controllers are checked against these interfaces.

Errors can be wraeped in a pkg/errors.Causer, as long as somewhere in the
line of causes one of the interfaces is implemented. The special error
interfaces take precedence over Causer, meaning if both Causer and one
of the new error interfaces are implemented, the Causer is not
traversed.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-08-15 16:01:11 -04:00
Sebastiaan van Stijn
b98ceb7121
Update NetworkConfig definition in Swagger
This patch updates the definition of `NetworkConfig` to match the code, and
renames to the definition to `NetworkSettings` (also to match the type in
the code).

Add definitions for:

- `Address`
- `PortMap`
- `PortBinding`
- `EndpointIPAMConfig`

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-15 09:39:41 +02:00
Kir Kolyshkin
7120976d74 Implement none, private, and shareable ipc modes
Since the commit d88fe447df ("Add support for sharing /dev/shm/ and
/dev/mqueue between containers") container's /dev/shm is mounted on the
host first, then bind-mounted inside the container. This is done that
way in order to be able to share this container's IPC namespace
(and the /dev/shm mount point) with another container.

Unfortunately, this functionality breaks container checkpoint/restore
(even if IPC is not shared). Since /dev/shm is an external mount, its
contents is not saved by `criu checkpoint`, and so upon restore any
application that tries to access data under /dev/shm is severily
disappointed (which usually results in a fatal crash).

This commit solves the issue by introducing new IPC modes for containers
(in addition to 'host' and 'container:ID'). The new modes are:

 - 'shareable':	enables sharing this container's IPC with others
		(this used to be the implicit default);

 - 'private':	disables sharing this container's IPC.

In 'private' mode, container's /dev/shm is truly mounted inside the
container, without any bind-mounting from the host, which solves the
issue.

While at it, let's also implement 'none' mode. The motivation, as
eloquently put by Justin Cormack, is:

> I wondered a while back about having a none shm mode, as currently it is
> not possible to have a totally unwriteable container as there is always
> a /dev/shm writeable mount. It is a bit of a niche case (and clearly
> should never be allowed to be daemon default) but it would be trivial to
> add now so maybe we should...

...so here's yet yet another mode:

 - 'none':	no /dev/shm mount inside the container (though it still
		has its own private IPC namespace).

Now, to ultimately solve the abovementioned checkpoint/restore issue, we'd
need to make 'private' the default mode, but unfortunately it breaks the
backward compatibility. So, let's make the default container IPC mode
per-daemon configurable (with the built-in default set to 'shareable'
for now). The default can be changed either via a daemon CLI option
(--default-shm-mode) or a daemon.json configuration file parameter
of the same name.

Note one can only set either 'shareable' or 'private' IPC modes as a
daemon default (i.e. in this context 'host', 'container', or 'none'
do not make much sense).

Some other changes this patch introduces are:

1. A mount for /dev/shm is added to default OCI Linux spec.

2. IpcMode.Valid() is simplified to remove duplicated code that parsed
   'container:ID' form. Note the old version used to check that ID does
   not contain a semicolon -- this is no longer the case (tests are
   modified accordingly). The motivation is we should either do a
   proper check for container ID validity, or don't check it at all
   (since it is checked in other places anyway). I chose the latter.

3. IpcMode.Container() is modified to not return container ID if the
   mode value does not start with "container:", unifying the check to
   be the same as in IpcMode.IsContainer().

3. IPC mode unit tests (runconfig/hostconfig_test.go) are modified
   to add checks for newly added values.

[v2: addressed review at https://github.com/moby/moby/pull/34087#pullrequestreview-51345997]
[v3: addressed review at https://github.com/moby/moby/pull/34087#pullrequestreview-53902833]
[v4: addressed the case of upgrading from older daemon, in this case
     container.HostConfig.IpcMode is unset and this is valid]
[v5: document old and new IpcMode values in api/swagger.yaml]
[v6: add the 'none' mode, changelog entry to docs/api/version-history.md]

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2017-08-14 10:50:39 +03:00
Victor Vieux
4930020210 hide swarm plugins behind experimental flag
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-08-08 18:33:25 -07:00
Sebastiaan van Stijn
1a0fbc4a6f Merge pull request #34287 from thaJeztah/bump-api-version
Bump API version to 1.32
2017-08-01 12:18:26 +02:00
Vincent Demeester
0fd90c4d5d Merge pull request #34202 from thaJeztah/swagger-external-secrets-store
Add API documentation for plugable secret backends
2017-08-01 10:59:08 +02:00
Sebastiaan van Stijn
c8dad44c32
Add API documentation for plugable secret backends
Documents the API changes introduced in

0304c98d85 and
08f7cf0526

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-28 00:00:53 +02:00
Sebastiaan van Stijn
05121d5554
Bump API version to 1.32
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-27 18:50:31 +02:00
Sebastiaan van Stijn
4735c76632
Update API plugin response examples
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-27 18:43:13 +02:00
Sebastiaan van Stijn
36e4e952f8 Merge pull request #34247 from thaJeztah/fix-restartpolicy-default
Fix RestartPolicy default value
2017-07-27 00:21:48 +02:00
Brian Goff
9319a8a2dd Merge pull request #33440 from RenaudWasTaken/genericresource
Added support for Generic Resources
2017-07-25 15:32:25 -04:00
Sebastiaan van Stijn
fc48b5529d
Fix RestartPolicy default value
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-25 16:14:59 +02:00
Renaud Gaubert
87e1464c43 Added support for Generic Resources
Signed-off-by: Renaud Gaubert <rgaubert@nvidia.com>
2017-07-24 17:49:56 -07:00
Sebastiaan van Stijn
a14f06a865 Merge pull request #34186 from thaJeztah/api-update-example-data
Improve API docs for UsageData
2017-07-20 09:38:28 +02:00
Sebastiaan van Stijn
8299f17278 Merge pull request #34183 from thaJeztah/api-changelog-add-volume-created-at
Update API history and example response for volume CreatedAt
2017-07-19 22:13:34 +02:00
Aaron Lehmann
ea1d14a189 api: Update swagger.yaml for configs
Also fix bad reference to ServiceSpec.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-07-19 09:52:25 -07:00
Sebastiaan van Stijn
194f635ce7
Improve API docs for UsageData
The docs did not mention when this information
was set, and what the `-1` value indicated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-19 16:25:38 +02:00
Sebastiaan van Stijn
48a83a3a18
Update API history and example response for volume CreatedAt
This adds the new `CreatedAt` field to the API version history
and updates some examples to show this information.

The `CreatedAt` field was implemented in a46f757c40

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-19 16:18:08 +02:00
Sebastiaan van Stijn
f6954bea9f
Fix API docs for GET /secrets/{id}, GET /secrets
The swagger.yml defined these endpoints to return
a "ServiceSpec" instead of a "SecretSpec".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-19 00:22:05 +02:00
Sebastiaan van Stijn
d0a8e73e7b
Service privileges: API docs
This documents the Service privileges
API changes, that were added in:
091b5e68ea

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-14 17:04:26 -07:00
allencloud
c8d6477e5a add config event in swagger.yml
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-07-12 08:48:14 +08:00
allencloud
f596fb7683 add cluster events details in swagger.yml
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-07-11 11:54:22 +08:00
Brian Goff
72c3bcf2a5 Make plugin emit strongly typed, consumable events
Enables other subsystems to watch actions for a plugin(s).

This will be used specifically for implementing plugins on swarm where a
swarm controller needs to watch the state of a plugin.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-07-06 14:26:06 -04:00
Sebastiaan van Stijn
9d95740dbf Merge pull request #33941 from thaJeztah/update-api-docs
Add missing API documentatoin for DataPathAddr
2017-07-05 18:35:45 -07:00
Sebastiaan van Stijn
c79c16910c
Add missing API documentatoin for DataPathAddr
COmmit 0307fe1a0b added
a new `DataPathAddr` property to the swarm/init and swarm/join
endpoints. This property was not yet added to the
documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-04 03:11:40 -07:00
Josh Soref
39bcaee47b
Spelling fixes
* additional
* ambiguous
* anonymous
* anything
* application
* because
* before
* building
* capabilities
* circumstances
* commit
* committer
* compresses
* concatenated
* config
* container
* container's
* current
* definition
* delimiter
* disassociates
* discovery
* distributed
* doesnotexist
* downloads
* duplicates
* either
* enhancing
* enumerate
* escapable
* exactly
* expect
* expectations
* expected
* explicitly
* false
* filesystem
* following
* forbidden
* git with
* healthcheck
* ignore
* independent
* inheritance
* investigating
* irrelevant
* it
* logging
* looking
* membership
* mimic
* minimum
* modify
* mountpoint
* multiline
* notifier
* outputting
* outside
* overridden
* override
* parsable
* plugins
* precedence
* propagation
* provided
* provides
* registries
* repositories
* returning
* settings
* should
* signals
* someone
* something
* specifically
* successfully
* synchronize
* they've
* thinking
* uninitialized
* unintentionally
* unmarshaling
* unnamed
* unreferenced
* verify

Signed-off-by: Josh Soref <jsoref@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-07-03 13:13:09 -07:00
Daniel Nephin
016eea004b
Set a LastUpdated time in image metadata when an image tag is updated.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-26 12:16:26 -07:00
Sebastiaan van Stijn
b8b8a9c837
Documentation updates for interactive sessions
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-22 15:36:56 -07:00
Tonis Tiigi
5c3d2d552b Implement incremental file sync using client session
Also exposes shared cache and garbage collection/prune
for the source data.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-22 11:52:35 -07:00
Tonis Tiigi
4f51ca1e82 session: update swagger yaml
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-06-22 11:22:42 -07:00
Yong Tang
158b2a1875 Add scope filter in /networks/<id>
This fix tries to add a `scope` in the query of `/networks/<id>`
(`NetworkInspect`) so that in case of duplicate network names,
it is possible to locate the network ID based on the network
scope (`local`, 'swarm', or `global`).

Multiple networks might exist in different scopes, which is a legitimate case.
For example, a network name `foo` might exists locally and in swarm network.

However, before this PR it was not possible to query a network name `foo`
in a specific scope like swarm.

This fix fixes the issue by allowing a `scope` query in `/networks/<id>`.

Additional test cases have been added to unit tests and integration tests.

This fix is related to docker/cli#167, moby/moby#30897, moby/moby#33561, moby/moby#30242

This fix fixes docker/cli#167

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-06-12 09:54:25 -07:00
Sebastiaan van Stijn
7839ff2244
Bump API version
With the Moby/Docker split, no decisions have been
made yet how, and when to bump the API version.

Although these decisions should not be lead
by Docker releases, I'm bumping the API version
to not complicate things for now; after this bump
we should make a plan how to handle this in future
(for example, using SemVer for the REST api, and
bump with every change).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-09 14:58:01 +02:00
Boaz Shuster
e8a1d99afb Describe the differences between container-inspect and container-list
Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
2017-06-06 21:33:08 +03:00
Sebastiaan van Stijn
d192db0d93 Merge pull request #33423 from gesellix/swagger-docs-typo
Fix typo in swagger doc
2017-05-29 15:58:50 +02:00
Sebastiaan van Stijn
79b19c2e16 Merge pull request #33257 from mtesselH/master
Add CreatedAt filed to volume. Display when volume is inspected.
2017-05-29 10:48:07 +01:00
Tobias Gesellchen
56da4f2fb2 Fix typo in swagger doc
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
2017-05-27 22:37:36 +02:00
Marianna
a46f757c40 Add CreatedAt filed to volume. Display when volume is inspected.
Closes #32663 by adding CreatedAt field when volume is created.
Displaying CreatedAt value when volume is inspected
Adding tests to verfiy the new field is correctly populated

Signed-off-by: Marianna <mtesselh@gmail.com>

Moving CreatedAt tests from the CLI

Moving the tests added for the newly added CreatedAt field for Volume, from CLI to API tests

Signed-off-by: Marianna <mtesselh@gmail.com>
2017-05-26 11:47:02 -07:00
Evan Hazlett
8eeba75198
remove RuntimeData from cluster and types
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-05-19 17:10:32 -04:00
Sebastiaan van Stijn
b654b6244d
Improve description of Running and Paused booleans
Commit abd72d4008 added
a "FIXME" comment to the container "State", mentioning
that a container cannot be both "Running" and "Paused".

This comment was incorrect, because containers on
Linux actually _must_ be running in order to be
paused.

This patch adds additional information both in a
comment, and in the API documentation to clarify
that these booleans are not mutually exclusive.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-05-19 12:29:54 +02:00
Josh Hawn
4921171587 Update ContainerWait API
This patch adds the untilRemoved option to the ContainerWait API which
allows the client to wait until the container is not only exited but
also removed.

This patch also adds some more CLI integration tests for waiting for a
created container and waiting with the new --until-removed flag.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Handle detach sequence in CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Update Container Wait Conditions

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Apply container wait changes to API 1.30

The set of changes to the containerWait API missed the cut for the
Docker 17.05 release (API version 1.29). This patch bumps the version
checks to use 1.30 instead.

This patch also makes a minor update to a testfile which was added to
the builder/dockerfile package.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Remove wait changes from CLI

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address minor nits on wait changes

- Changed the name of the tty Proxy wrapper to `escapeProxy`
- Removed the unnecessary Error() method on container.State
- Fixes a typo in comment (repeated word)

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Use router.WithCancel in the containerWait handler

This handler previously added this functionality manually but now uses
the existing wrapper which does it for us.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Add WaitCondition constants to api/types/container

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

- Update ContainerWait backend interface to not return pointer values
  for container.StateStatus type.
- Updated container state's Wait() method comments to clarify that a
  context MUST be used for cancelling the request, setting timeouts,
  and to avoid goroutine leaks.
- Removed unnecessary buffering when making channels in the client's
  ContainerWait methods.
- Renamed result and error channels in client's ContainerWait methods
  to clarify that only a single result or error value would be sent
  on the channel.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Move container.WaitCondition type to separate file

... to avoid conflict with swagger-generated code for API response

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)

Address more ContainerWait review comments

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2017-05-16 15:11:39 -07:00
Nishant Totla
1efbe6e876
Adding Platforms field to TaskSpec
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-05-15 14:58:20 -07:00
Aaron Lehmann
eb8abc9598 Merge pull request #32993 from cyli/root-rotation-cli
API changes to rotate swarm root CA
2017-05-12 10:12:32 -07:00
Evan Hazlett
1245866249 Merge pull request #33164 from thaJeztah/add-secret-to-service-create-example
Add "secrets" example for service create API docs
2017-05-11 23:42:58 -04:00
Ying Li
1847bb899a Propagate the desired CA certificate and CAConfig ForceRotate parameter
in the Docker REST APIs when viewing or updating the swarm spec info, and
also propagate the desired CA key in the Docker REST APIs when updating
swarm spec info only (it is not available for viewing).

Signed-off-by: Ying Li <ying.li@docker.com>
2017-05-11 10:22:42 -07:00
Sebastiaan van Stijn
f3bcea00cd Fix secret/{id} response example
Fixes a warning that was shown;

    Warning: Other properties are defined at the same level as $ref at
    "#/paths/~1secrets~1{id}/get/responses/200/schema". They are IGNORED according
    to the JsonSchema spec

That resulted in the example not being
rendered in the documentation.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-05-11 18:02:19 +02:00
Sebastiaan van Stijn
3e7c1b9a99
Add "secrets" example for service create API docs
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-05-11 17:46:10 +02:00
Sebastiaan van Stijn
f02a5b50c4 Merge pull request #32875 from cyli/root-ca-info-in-api
Propagate TLS Info in swarm info and node info REST endpoints
2017-05-11 00:35:46 +02:00
Ying Li
64cccedbce Propagate the swarm cluster and node TLS info provided by the swarm
objects into the REST API responses.  In the CLI, display only
whether the nodes' TLS info matches the cluster's TLS info, or
whether the node needs cert rotation.

Signed-off-by: Ying Li <ying.li@docker.com>
2017-05-10 11:29:17 -07:00
Nishant Totla
4a812040eb
Adding example to /distribution/{name}/json endpoint swagger spec
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-05-10 11:20:03 -07:00
Nishant Totla
12e232ee35
/distribution/{name}/json returns full Descriptor object
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-05-09 17:25:27 -07:00
Nishant Totla
41b27de41b
Adding /distribution/{name}/json endpoint to contact registry
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-05-08 16:58:38 -07:00
Sebastiaan van Stijn
fedb3b8884
Update description and example for network-list endpoint
As of API 1.28, the network-list endpoint no longer
returns a list of containers attached to each network.

This patch updates the example response, and adds
a note to the description.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-05-05 10:36:48 -07:00
Sebastiaan van Stijn
118d4ee123 Merge pull request #32951 from wsong/patch-2
Add a proper type to the Source field in Mount
2017-05-04 17:09:25 -07:00
Brian Goff
146e058592 Add swagger spec for /info Log plugins
The `Log` field for plugins was added to `/info` in
17abacb894 but the swagger spec was not
updated.
This just updates the spec to match reality.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-05-02 14:42:41 -04:00
Wayne Song
7a95836931 Add a proper type to the Source field in Mount
This field was missing a type, which meant that the example objects that Swagger tools generate did not work.

Signed-off-by: Wayne Song <wsong@docker.com>
2017-05-02 09:39:52 -07:00
Sebastiaan van Stijn
6d7ae1fa0b Merge pull request #32894 from davidxia/patch1
[docs] Add missing Name field to NetworkContainer object
2017-04-28 18:28:31 -07:00
Brian Goff
25058d9b0c Merge pull request #32828 from cyli/external-ca-cert
Add the `CACert` parameter to the `ExternalCA` object
2017-04-28 10:30:57 -04:00
Brian Goff
9752e41fd0 Merge pull request #32653 from allencloud/add-empty-string-for-restartpolicy-in-swagger
add empty string for restart policy in swagger.yml
2017-04-28 00:03:09 -04:00
Brian Goff
a7519152d9 Merge pull request #32504 from dongluochen/healthcheck_duration
do not allow duration less than 1 ms in healthcheck parameters
2017-04-27 23:54:00 -04:00
David Xia
eda3ab9394
Add missing Name field to NetworkContainer object
See https://github.com/spotify/docker-client/issues/730

Signed-off-by: David Xia <dxia@spotify.com>
2017-04-27 10:33:19 -04:00
Ying Li
b0401a71f7 Add the CACert parameter to the ExternalCA object in order to match
swarmkit's API type.  Make sure this parameter gets propagated to
swarmkit, and also add an extra option to the CLI when providing
external CAs to parse the CA cert from a file.

Signed-off-by: Ying Li <ying.li@docker.com>
2017-04-26 10:45:12 -07:00
allencloud
1c7b03a455 add empty string for restart policy in swagger.yml
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-04-17 14:37:37 +08:00
allencloud
56dca8b676 update status code for network api
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-04-14 10:11:17 +08:00
Vincent Demeester
05930120a0 Merge pull request #32464 from allencloud/add-status-code-400-for-update-endpoint
add status code 400 for update endpoints in swagger.yml
2017-04-13 10:33:04 +02:00
Dong Chen
d8b6a35d02 set 1ms as container duration minimum value
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2017-04-12 15:45:29 -07:00
Vincent Demeester
d0bd5aa2a7 Merge pull request #32481 from yongtang/30740-docs-prune-label
Update docs of `label` filter for `docker system prune`
2017-04-12 15:37:04 +02:00
Anusha Ragunathan
3343653edb Merge pull request #32030 from ehazlett/any-runtime
Support Swarmkit Generic Task Runtime
2017-04-11 17:53:20 -07:00
Yong Tang
5b0ab45a1e Update docs of label filter for docker system prune
This fix updates docs of `label` filter for `docker system prune`.

This fix is related to #30740 and #29999, and specifically to comment
https://github.com/docker/docker/pull/30740#issuecomment-293012957.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-04-11 12:08:55 -07:00
Victor Vieux
b507158c0f bump API and version
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
2017-04-11 11:21:55 -07:00
Evan Hazlett
d6bb4ae434 updated swagger with new fields for task spec
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-04-11 14:02:02 -04:00
Sebastiaan van Stijn
a258ef58d8 Merge pull request #32284 from aaronlehmann/fix-service-defaults
Improve default handling for "service create"
2017-04-11 13:06:53 +02:00
Aaron Lehmann
1d274e9acf Change "service inspect" to show defaults in place of empty fields
This adds a new parameter insertDefaults to /services/{id}. When this is
set, an empty field (such as UpdateConfig) will be populated with
default values in the API response. Make "service inspect" use this, so
that empty fields do not result in missing information when inspecting a
service.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-04-10 13:41:16 -07:00
Drew Erny
306cfecc8c Remove experimental from service logs
Service logs API is now stable. Service logs now support all features,
except retrieving details provided to the log driver.

Signed-off-by: Drew Erny <drew.erny@docker.com>
2017-04-10 13:40:45 -07:00
allencloud
c284e85f59 add status code 400 for update endpoints in swagger.yml
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-04-10 15:13:56 +08:00
allencloud
412099baa9 add hosts example for serviceSpec in swagger.yml
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-04-07 17:06:52 +08:00
Aaron Lehmann
9b54994a8a Add support for update order
This parameter controls the order of operations when rolling out an
update task. Either the old task is stopped before starting the new one,
or the new task is started first, and the running tasks will briefly
overlap.

This commit adds Rollout to the API, and --update-order / --rollback-order
flags to the CLI.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-04-06 17:23:36 -07:00
Elias Faxö
e401f63735 Added start period option to health check.
Signed-off-by: Elias Faxö <elias.faxo@gmail.com>
2017-04-06 12:35:34 +02:00
Victor Vieux
170be9c267 Merge pull request #32015 from dperny/service-logs-support-task-logs
Add Support for Service Task Logs
2017-04-04 00:15:13 -07:00
Drew Erny
d330dc3223 Add support for task and arbitrary combo logs
Refactored the API to more easily accept new endpoints. Added REST,
client, and CLI endpoints for getting logs from a specific task. All
that is needed after this commit to enable arbitrary service log
selectors is a REST endpoint and handler.

Task logs can be retrieved by putting in a task ID at the CLI instead of
a service ID.

Signed-off-by: Drew Erny <drew.erny@docker.com>
2017-04-03 18:40:54 -07:00
Vincent Demeester
9f9cc221bd Merge pull request #31634 from AkihiroSuda/clarify-env-without-value
api: clarify that Env var without `=` is removed from the environment
2017-03-31 17:34:32 +02:00
Sebastiaan van Stijn
4df350b8c7 Merge pull request #30810 from allencloud/make-secret-ls-support-filter
make secret ls support filters in CLI
2017-03-28 13:43:19 +02:00
Sebastiaan van Stijn
abecc530ee Merge pull request #32107 from mkumatag/fix_api_doc
Fix Healthcheck API doc
2017-03-27 18:45:48 +02:00
allencloud
3935074016 make secret ls support filters in CLI
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-03-27 10:16:45 +08:00
Alessandro Boch
d59d19c328 Allow user to modify ingress network
Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-03-26 15:46:18 -07:00
Manjunath A Kumatagi
4df54695ef Fix Healthcheck API doc
Signed-off-by: Manjunath A Kumatagi <mkumatag@in.ibm.com>
2017-03-26 08:45:11 -04:00
Yong Tang
704ea8f6b4 Add --filter scope=swarm|local for docker network ls
This fix tries to address the request in 31324 by adding
`--filter scope=swarm|local` for `docker network ls`.

As `docker network ls` has a `SCOPE` column by default,
it is natural to add the support of `--filter scope=swarm|local`.

This fix adds the `scope=swarm|local` support for
`docker network ls --filter`.

Related docs has been updated.

Additional unit test cases have been added.

This fix fixes 31324.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-03-23 18:48:11 -07:00
Tibor Vass
0caced4644 Merge pull request #31715 from anusha-ragunathan/ipc-host
Add support in plugin config for accessing host ipc and pid namespace.
2017-03-22 14:17:21 -07:00