mirror of https://github.com/docker/cli.git
Merge pull request #4279 from thaJeztah/remove_deprecated_stack_stubs
cli/command/stack: remove deprecated RunDeploy, RunPS, RunRemove, GetServices
This commit is contained in:
commit
3d9905f3d6
|
@ -6,9 +6,7 @@ import (
|
|||
"github.com/docker/cli/cli/command/stack/loader"
|
||||
"github.com/docker/cli/cli/command/stack/options"
|
||||
"github.com/docker/cli/cli/command/stack/swarm"
|
||||
composetypes "github.com/docker/cli/cli/compose/types"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
func newDeployCommand(dockerCli command.Cli) *cobra.Command {
|
||||
|
@ -46,10 +44,3 @@ func newDeployCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.SetAnnotation("resolve-image", "version", []string{"1.30"})
|
||||
return cmd
|
||||
}
|
||||
|
||||
// RunDeploy performs a stack deploy against the specified swarm cluster.
|
||||
//
|
||||
// Deprecated: use [swarm.RunDeploy] instead.
|
||||
func RunDeploy(dockerCli command.Cli, _ *pflag.FlagSet, config *composetypes.Config, opts options.Deploy) error {
|
||||
return swarm.RunDeploy(dockerCli, opts, config)
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import (
|
|||
flagsHelper "github.com/docker/cli/cli/flags"
|
||||
cliopts "github.com/docker/cli/opts"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
func newPsCommand(dockerCli command.Cli) *cobra.Command {
|
||||
|
@ -37,10 +36,3 @@ func newPsCommand(dockerCli command.Cli) *cobra.Command {
|
|||
flags.StringVar(&opts.Format, "format", "", flagsHelper.FormatHelp)
|
||||
return cmd
|
||||
}
|
||||
|
||||
// RunPs performs a stack ps against the specified swarm cluster.
|
||||
//
|
||||
// Deprecated: use [swarm.RunPS] instead.
|
||||
func RunPs(dockerCli command.Cli, _ *pflag.FlagSet, opts options.PS) error {
|
||||
return swarm.RunPS(dockerCli, opts)
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import (
|
|||
"github.com/docker/cli/cli/command/stack/options"
|
||||
"github.com/docker/cli/cli/command/stack/swarm"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
func newRemoveCommand(dockerCli command.Cli) *cobra.Command {
|
||||
|
@ -30,10 +29,3 @@ func newRemoveCommand(dockerCli command.Cli) *cobra.Command {
|
|||
}
|
||||
return cmd
|
||||
}
|
||||
|
||||
// RunRemove performs a stack remove against the specified swarm cluster.
|
||||
//
|
||||
// Deprecated: use [swarm.RunRemove] instead.
|
||||
func RunRemove(dockerCli command.Cli, _ *pflag.FlagSet, opts options.Remove) error {
|
||||
return swarm.RunRemove(dockerCli, opts)
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ import (
|
|||
swarmtypes "github.com/docker/docker/api/types/swarm"
|
||||
"github.com/fvbommel/sortorder"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
func newServicesCommand(dockerCli command.Cli) *cobra.Command {
|
||||
|
@ -52,13 +51,6 @@ func RunServices(dockerCli command.Cli, opts options.Services) error {
|
|||
return formatWrite(dockerCli, services, opts)
|
||||
}
|
||||
|
||||
// GetServices returns the services for the specified swarm cluster.
|
||||
//
|
||||
// Deprecated: use [swarm.GetServices] instead.
|
||||
func GetServices(dockerCli command.Cli, _ *pflag.FlagSet, opts options.Services) ([]swarmtypes.Service, error) {
|
||||
return swarm.GetServices(dockerCli, opts)
|
||||
}
|
||||
|
||||
func formatWrite(dockerCli command.Cli, services []swarmtypes.Service, opts options.Services) error {
|
||||
// if no services in the stack, print message and exit 0
|
||||
if len(services) == 0 {
|
||||
|
|
Loading…
Reference in New Issue