Skip to content

Commit e63f0e6

Browse files
committed
cmd/openshift-install: Remove deprecated commands
These have been deprecated since 3f4fe57 (cmd/openshift-install: Add 'destroy bootstrap' command, 2018-10-18, #493) and 85c76c9 (cmd/openshift-install: Push creation under 'openshift create', 2018-10-22, #513). The destroy commands were deprecated before the 0.3.0 release, so removing them now should be fine. The create commands landed after 0.3.0, but it's been a long time since they were deprecated. Our released versions currently go stale pretty fast, so there are unlikely to be any consumers of the old create commands that this removal would break.
1 parent 21894d6 commit e63f0e6

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)