Files
docker-cli/cli/command/volume/cmd.go
Drew Erny 3455580ebc Add cluster volume support
- Write test for cluster volumes
- Add inspect test, add update command
- Add cluster volume opts to create
- Add requisite and preferred topology flags
- volume: move cluster bool in opts

Signed-off-by: Drew Erny <derny@mirantis.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 20:06:11 +02:00

28 lines
692 B
Go

package volume
import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
)
// NewVolumeCommand returns a cobra command for `volume` subcommands
func NewVolumeCommand(dockerCli command.Cli) *cobra.Command {
cmd := &cobra.Command{
Use: "volume COMMAND",
Short: "Manage volumes",
Args: cli.NoArgs,
RunE: command.ShowHelp(dockerCli.Err()),
Annotations: map[string]string{"version": "1.21"},
}
cmd.AddCommand(
newCreateCommand(dockerCli),
newInspectCommand(dockerCli),
newListCommand(dockerCli),
newRemoveCommand(dockerCli),
NewPruneCommand(dockerCli),
newUpdateCommand(dockerCli),
)
return cmd
}