Skip to content

Commit 024ef63

Browse files
Merge pull request #715 from wking/drop-deprecated-commands
cmd/openshift-install: Remove deprecated commands
2 parents fee8955 + e63f0e6 commit 024ef63

File tree

3 files changed

+0
-26
lines changed

3 files changed

+0
-26
lines changed

cmd/openshift-install/create.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package main
22

33
import (
44
"context"
5-
"fmt"
65
"os/exec"
76
"path/filepath"
87
"strings"
@@ -102,18 +101,6 @@ var (
102101
targets = []target{installConfigTarget, manifestTemplatesTarget, manifestsTarget, ignitionConfigsTarget, clusterTarget}
103102
)
104103

105-
// Deprecated: Use 'create' subcommands instead.
106-
func newTargetsCmd() []*cobra.Command {
107-
var cmds []*cobra.Command
108-
for _, t := range targets {
109-
cmd := *t.command
110-
cmd.Short = fmt.Sprintf("DEPRECATED: USE 'create %s' instead.", cmd.Use)
111-
cmd.RunE = runTargetCmd(t.assets...)
112-
cmds = append(cmds, &cmd)
113-
}
114-
return cmds
115-
}
116-
117104
func newCreateCmd() *cobra.Command {
118105
cmd := &cobra.Command{
119106
Use: "create",

cmd/openshift-install/destroy.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ func newDestroyCmd() *cobra.Command {
2626
return cmd
2727
}
2828

29-
func newLegacyDestroyClusterCmd() *cobra.Command {
30-
return &cobra.Command{
31-
Use: "destroy-cluster",
32-
Short: "DEPRECATED: Use 'destroy cluster' instead.",
33-
RunE: runDestroyCmd,
34-
}
35-
}
36-
3729
func newDestroyClusterCmd() *cobra.Command {
3830
return &cobra.Command{
3931
Use: "cluster",

cmd/openshift-install/main.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,9 @@ var (
2020
func main() {
2121
rootCmd := newRootCmd()
2222

23-
for _, cmd := range newTargetsCmd() {
24-
rootCmd.AddCommand(cmd)
25-
}
26-
2723
for _, subCmd := range []*cobra.Command{
2824
newCreateCmd(),
2925
newDestroyCmd(),
30-
newLegacyDestroyClusterCmd(),
3126
newVersionCmd(),
3227
newGraphCmd(),
3328
} {

0 commit comments

Comments
 (0)