From 3fe470656a2bd5c1002f328cd98aca91f52af2c4 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Wed, 8 Jun 2016 13:47:46 -0400 Subject: [PATCH] Add experimental docker stack commands Signed-off-by: Daniel Nephin --- cobraadaptor/adaptor.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cobraadaptor/adaptor.go b/cobraadaptor/adaptor.go index 55538dd98f..44d0a5e00c 100644 --- a/cobraadaptor/adaptor.go +++ b/cobraadaptor/adaptor.go @@ -8,6 +8,7 @@ import ( "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/stack" "github.com/docker/docker/api/client/swarm" "github.com/docker/docker/api/client/system" "github.com/docker/docker/api/client/volume" @@ -41,6 +42,8 @@ func NewCobraAdaptor(clientFlags *cliflags.ClientFlags) CobraAdaptor { rootCmd.AddCommand( node.NewNodeCommand(dockerCli), service.NewServiceCommand(dockerCli), + stack.NewStackCommand(dockerCli), + stack.NewTopLevelDeployCommand(dockerCli), swarm.NewSwarmCommand(dockerCli), container.NewAttachCommand(dockerCli), container.NewCommitCommand(dockerCli), @@ -96,7 +99,9 @@ func NewCobraAdaptor(clientFlags *cliflags.ClientFlags) CobraAdaptor { func (c CobraAdaptor) Usage() []cli.Command { cmds := []cli.Command{} for _, cmd := range c.rootCmd.Commands() { - cmds = append(cmds, cli.Command{Name: cmd.Name(), Description: cmd.Short}) + if cmd.Name() != "" { + cmds = append(cmds, cli.Command{Name: cmd.Name(), Description: cmd.Short}) + } } return cmds }