From e63f0e6487ad6d021d12b0cac98b08ff2dec7f8e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 21 Nov 2018 11:26:34 -0800 Subject: [PATCH] cmd/openshift-install: Remove deprecated commands These have been deprecated since 3f4fe574 (cmd/openshift-install: Add 'destroy bootstrap' command, 2018-10-18, #493) and 85c76c98 (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. --- cmd/openshift-install/create.go | 13 ------------- cmd/openshift-install/destroy.go | 8 -------- cmd/openshift-install/main.go | 5 ----- 3 files changed, 26 deletions(-) diff --git a/cmd/openshift-install/create.go b/cmd/openshift-install/create.go index 9ba7ec7974d..411ae3f6bc0 100644 --- a/cmd/openshift-install/create.go +++ b/cmd/openshift-install/create.go @@ -2,7 +2,6 @@ package main import ( "context" - "fmt" "os/exec" "path/filepath" "strings" @@ -102,18 +101,6 @@ var ( targets = []target{installConfigTarget, manifestTemplatesTarget, manifestsTarget, ignitionConfigsTarget, clusterTarget} ) -// Deprecated: Use 'create' subcommands instead. -func newTargetsCmd() []*cobra.Command { - var cmds []*cobra.Command - for _, t := range targets { - cmd := *t.command - cmd.Short = fmt.Sprintf("DEPRECATED: USE 'create %s' instead.", cmd.Use) - cmd.RunE = runTargetCmd(t.assets...) - cmds = append(cmds, &cmd) - } - return cmds -} - func newCreateCmd() *cobra.Command { cmd := &cobra.Command{ Use: "create", diff --git a/cmd/openshift-install/destroy.go b/cmd/openshift-install/destroy.go index 95ea3b8ed12..5da614b7047 100644 --- a/cmd/openshift-install/destroy.go +++ b/cmd/openshift-install/destroy.go @@ -26,14 +26,6 @@ func newDestroyCmd() *cobra.Command { return cmd } -func newLegacyDestroyClusterCmd() *cobra.Command { - return &cobra.Command{ - Use: "destroy-cluster", - Short: "DEPRECATED: Use 'destroy cluster' instead.", - RunE: runDestroyCmd, - } -} - func newDestroyClusterCmd() *cobra.Command { return &cobra.Command{ Use: "cluster", diff --git a/cmd/openshift-install/main.go b/cmd/openshift-install/main.go index 41d585d3352..b79be626ed3 100644 --- a/cmd/openshift-install/main.go +++ b/cmd/openshift-install/main.go @@ -20,14 +20,9 @@ var ( func main() { rootCmd := newRootCmd() - for _, cmd := range newTargetsCmd() { - rootCmd.AddCommand(cmd) - } - for _, subCmd := range []*cobra.Command{ newCreateCmd(), newDestroyCmd(), - newLegacyDestroyClusterCmd(), newVersionCmd(), newGraphCmd(), } {