From 408531dafa6ae9d50e7ebd13253e07244e04ffe5 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Mon, 13 Jun 2016 19:56:23 -0700 Subject: [PATCH] Add Swarm management CLI commands As described in our ROADMAP.md, introduce new Swarm management commands to call to the corresponding API endpoints. This PR is fully backward compatible (joining a Swarm is an optional feature of the Engine, and existing commands are not impacted). Signed-off-by: Daniel Nephin Signed-off-by: Victor Vieux Signed-off-by: Tonis Tiigi --- cobraadaptor/adaptor.go | 6 ++++++ usage.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cobraadaptor/adaptor.go b/cobraadaptor/adaptor.go index 4d2958b531..6f1a8876b3 100644 --- a/cobraadaptor/adaptor.go +++ b/cobraadaptor/adaptor.go @@ -5,7 +5,10 @@ import ( "github.com/docker/docker/api/client/container" "github.com/docker/docker/api/client/image" "github.com/docker/docker/api/client/network" + "github.com/docker/docker/api/client/node" "github.com/docker/docker/api/client/registry" + "github.com/docker/docker/api/client/service" + "github.com/docker/docker/api/client/swarm" "github.com/docker/docker/api/client/system" "github.com/docker/docker/api/client/volume" "github.com/docker/docker/cli" @@ -36,6 +39,9 @@ func NewCobraAdaptor(clientFlags *cliflags.ClientFlags) CobraAdaptor { rootCmd.SetFlagErrorFunc(cli.FlagErrorFunc) rootCmd.SetOutput(stdout) rootCmd.AddCommand( + node.NewNodeCommand(dockerCli), + service.NewServiceCommand(dockerCli), + swarm.NewSwarmCommand(dockerCli), container.NewAttachCommand(dockerCli), container.NewCommitCommand(dockerCli), container.NewCreateCommand(dockerCli), diff --git a/usage.go b/usage.go index 73fa4f2245..3c3b321be6 100644 --- a/usage.go +++ b/usage.go @@ -11,7 +11,7 @@ var DockerCommandUsage = []Command{ {"cp", "Copy files/folders between a container and the local filesystem"}, {"exec", "Run a command in a running container"}, {"info", "Display system-wide information"}, - {"inspect", "Return low-level information on a container or image"}, + {"inspect", "Return low-level information on a container, image or task"}, {"update", "Update configuration of one or more containers"}, }