DockerCLI/cli/command/swarm
Sebastiaan van Stijn 91b1ad9d2b
Add API-version anotation for --data-path-addr
This flag was added in Docker 17.06, API version 1.31 through
moby@8dc8cd4719f165c01c98e7d3ce1d6cea6a8f60b8, but didn't add
API-version annotations.

This patch adds the missing annotations to hide this flag if
the CLI is connected to an older version of the daemon that
doesn't support that API.

Before this patch:

    DOCKER_API_VERSION=1.30 docker swarm init --help | grep data-path-addr
          --data-path-addr string           Address or interface to use for data path traffic (format: <ip|interface>)

    DOCKER_API_VERSION=1.31 docker swarm init --help | grep data-path-addr
          --data-path-addr string           Address or interface to use for data path traffic (format: <ip|interface>)

With this patch applied:

    DOCKER_API_VERSION=1.30 docker swarm init --help | grep data-path-addr
    # (no result)

    DOCKER_API_VERSION=1.31 docker swarm init --help | grep data-path-addr
          --data-path-addr string           Address or interface to use for data path traffic (format: <ip|interface>)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-07-30 11:05:20 +02:00
..
progress Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
testdata Update code for upstream cobra 2017-10-25 14:49:26 -04:00
ca.go Propagate the provided external CA certificate to the external CA object 2018-07-02 17:14:21 -07:00
ca_test.go Propagate the provided external CA certificate to the external CA object 2018-07-02 17:14:21 -07:00
client_test.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
cmd.go Error out on orchestrator command that don't support k8s yet 2017-12-26 11:46:59 +01:00
init.go Add API-version anotation for --data-path-addr 2018-07-30 11:05:20 +02:00
init_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
join.go Add API-version anotation for --data-path-addr 2018-07-30 11:05:20 +02:00
join_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
join_token.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
join_token_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
leave.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
leave_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
opts.go Propagate the provided external CA certificate to the external CA object 2018-07-02 17:14:21 -07:00
opts_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
unlock.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
unlock_key.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
unlock_key_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
unlock_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
update.go Propagate the provided external CA certificate to the external CA object 2018-07-02 17:14:21 -07:00
update_test.go Propagate the provided external CA certificate to the external CA object 2018-07-02 17:14:21 -07:00