DockerCLI/cli/command/stack
Sebastiaan van Stijn 7405ac5c2d
Services: use ServiceStatus on API v1.41 and up
API v1.41 adds a new option to get the number of desired
and running tasks when listing services. This patch enables
this functionality, and provides a fallback mechanism when
the ServiceStatus is not available, which would be when
using an older API version.

Now that the swarm.Service struct captures this information,
the `ListInfo` type is no longer needed, so it is removed,
and the related list- and formatting functions have been
modified accordingly.

To reduce repetition, sorting the services has been moved
to the formatter. This is a slight change in behavior, but
all calls to the formatter performed this sort first, so
the change will not lead to user-facing changes.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:49:28 +01:00
..
formatter formatter package heavy refactoring 2018-10-23 17:05:44 +02:00
kubernetes Services: use ServiceStatus on API v1.41 and up 2019-10-29 15:49:28 +01:00
loader Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
options Support multiple namespaces for docker stack ls 2018-05-15 16:52:21 +02:00
swarm Services: use ServiceStatus on API v1.41 and up 2019-10-29 15:49:28 +01:00
testdata Add an orchestrator column in the docker stack ls command 2018-04-30 12:04:02 +02:00
client_test.go Fix tests with missing mocks 2018-11-08 11:37:49 +01:00
cmd.go Make default context behaves like a real context: 2019-03-18 11:45:46 +01:00
common.go Expose all stack commands to be used by downstream projects. 2019-01-16 14:47:50 +01:00
deploy.go Expose all stack commands to be used by downstream projects. 2019-01-16 14:47:50 +01:00
deploy_test.go Refactor `stack` command/package 2018-06-26 14:07:26 +02:00
list.go Expose all stack commands to be used by downstream projects. 2019-01-16 14:47:50 +01:00
list_test.go refactor stack list command unit tests to table-driven 2018-09-19 22:13:03 -04:00
ps.go Expose all stack commands to be used by downstream projects. 2019-01-16 14:47:50 +01:00
ps_test.go refactor stack ps tests to table-driven 2018-08-10 15:13:45 -04:00
remove.go Expose all stack commands to be used by downstream projects. 2019-01-16 14:47:50 +01:00
remove_test.go Refactor `stack` command/package 2018-06-26 14:07:26 +02:00
services.go Expose all stack commands to be used by downstream projects. 2019-01-16 14:47:50 +01:00
services_test.go TestStackServicesErrors: use sub-tests, and return tasks 2019-10-29 15:47:52 +01:00