Skip to content

Commit 3d9905f

Browse files
authored
Merge pull request #4279 from thaJeztah/remove_deprecated_stack_stubs
cli/command/stack: remove deprecated RunDeploy, RunPS, RunRemove, GetServices
2 parents fecb1b2 + d3ac801 commit 3d9905f

4 files changed

Lines changed: 0 additions & 33 deletions

File tree

cli/command/stack/deploy.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ import (
66
"github.com/docker/cli/cli/command/stack/loader"
77
"github.com/docker/cli/cli/command/stack/options"
88
"github.com/docker/cli/cli/command/stack/swarm"
9-
composetypes "github.com/docker/cli/cli/compose/types"
109
"github.com/spf13/cobra"
11-
"github.com/spf13/pflag"
1210
)
1311

1412
func newDeployCommand(dockerCli command.Cli) *cobra.Command {
@@ -46,10 +44,3 @@ func newDeployCommand(dockerCli command.Cli) *cobra.Command {
4644
flags.SetAnnotation("resolve-image", "version", []string{"1.30"})
4745
return cmd
4846
}
49-
50-
// RunDeploy performs a stack deploy against the specified swarm cluster.
51-
//
52-
// Deprecated: use [swarm.RunDeploy] instead.
53-
func RunDeploy(dockerCli command.Cli, _ *pflag.FlagSet, config *composetypes.Config, opts options.Deploy) error {
54-
return swarm.RunDeploy(dockerCli, opts, config)
55-
}

cli/command/stack/ps.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
flagsHelper "github.com/docker/cli/cli/flags"
99
cliopts "github.com/docker/cli/opts"
1010
"github.com/spf13/cobra"
11-
"github.com/spf13/pflag"
1211
)
1312

1413
func newPsCommand(dockerCli command.Cli) *cobra.Command {
@@ -37,10 +36,3 @@ func newPsCommand(dockerCli command.Cli) *cobra.Command {
3736
flags.StringVar(&opts.Format, "format", "", flagsHelper.FormatHelp)
3837
return cmd
3938
}
40-
41-
// RunPs performs a stack ps against the specified swarm cluster.
42-
//
43-
// Deprecated: use [swarm.RunPS] instead.
44-
func RunPs(dockerCli command.Cli, _ *pflag.FlagSet, opts options.PS) error {
45-
return swarm.RunPS(dockerCli, opts)
46-
}

cli/command/stack/remove.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"github.com/docker/cli/cli/command/stack/options"
77
"github.com/docker/cli/cli/command/stack/swarm"
88
"github.com/spf13/cobra"
9-
"github.com/spf13/pflag"
109
)
1110

1211
func newRemoveCommand(dockerCli command.Cli) *cobra.Command {
@@ -30,10 +29,3 @@ func newRemoveCommand(dockerCli command.Cli) *cobra.Command {
3029
}
3130
return cmd
3231
}
33-
34-
// RunRemove performs a stack remove against the specified swarm cluster.
35-
//
36-
// Deprecated: use [swarm.RunRemove] instead.
37-
func RunRemove(dockerCli command.Cli, _ *pflag.FlagSet, opts options.Remove) error {
38-
return swarm.RunRemove(dockerCli, opts)
39-
}

cli/command/stack/services.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
swarmtypes "github.com/docker/docker/api/types/swarm"
1616
"github.com/fvbommel/sortorder"
1717
"github.com/spf13/cobra"
18-
"github.com/spf13/pflag"
1918
)
2019

2120
func newServicesCommand(dockerCli command.Cli) *cobra.Command {
@@ -52,13 +51,6 @@ func RunServices(dockerCli command.Cli, opts options.Services) error {
5251
return formatWrite(dockerCli, services, opts)
5352
}
5453

55-
// GetServices returns the services for the specified swarm cluster.
56-
//
57-
// Deprecated: use [swarm.GetServices] instead.
58-
func GetServices(dockerCli command.Cli, _ *pflag.FlagSet, opts options.Services) ([]swarmtypes.Service, error) {
59-
return swarm.GetServices(dockerCli, opts)
60-
}
61-
6254
func formatWrite(dockerCli command.Cli, services []swarmtypes.Service, opts options.Services) error {
6355
// if no services in the stack, print message and exit 0
6456
if len(services) == 0 {

0 commit comments

Comments
 (0)