1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-06 00:48:45 +01:00

Merge pull request #715 from wking/drop-deprecated-commands

cmd/openshift-install: Remove deprecated commands
This commit is contained in:
OpenShift Merge Robot
2018-11-21 20:35:41 -08:00
committed by GitHub
3 changed files with 0 additions and 26 deletions

View File

@@ -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",

View File

@@ -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",

View File

@@ -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(),
} {