Skip to content

Commit

Permalink
Merge pull request moby#23522 from docker/swarm-stack
Browse files Browse the repository at this point in the history
Add experimental Docker Stack CLI commands
  • Loading branch information
Arnaud Porterie authored Jun 15, 2016
2 parents 11c8c6c + 3fe4706 commit 8e224f9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cobraadaptor/adaptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/docker/docker/api/client/plugin"
"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"
Expand Down Expand Up @@ -42,6 +43,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),
Expand Down Expand Up @@ -98,7 +101,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
}
Expand Down

0 comments on commit 8e224f9

Please sign in to comment.