Support 'all' in orchestrator flag for docker stack ls

All other docker stack commands report an error when passed this value.

Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
This commit is contained in:
Mathieu Champlon
2018-04-25 14:24:46 +02:00
parent 0d7bb8adaa
commit 4d947de292
15 changed files with 144 additions and 98 deletions

View File

@ -1,11 +1,15 @@
package stack
import (
"fmt"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
)
var errUnsupportedAllOrchestrator = fmt.Errorf(`no orchestrator specified: use either "kubernetes" or "swarm"`)
// NewStackCommand returns a cobra command for `stack` subcommands
func NewStackCommand(dockerCli command.Cli) *cobra.Command {
cmd := &cobra.Command{