forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
migrate.go
30 lines (23 loc) · 801 Bytes
/
migrate.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package migrate
import (
"io"
"github.com/spf13/cobra"
"k8s.io/kubernetes/pkg/kubectl/cmd/templates"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
"github.com/openshift/origin/pkg/cmd/util/clientcmd"
)
const MigrateRecommendedName = "migrate"
var migrateLong = templates.LongDesc(`
Migrate resources on the cluster
These commands assist administrators in performing preventative maintenance on a cluster.`)
func NewCommandMigrate(name, fullName string, f *clientcmd.Factory, out, errOut io.Writer, cmds ...*cobra.Command) *cobra.Command {
// Parent command to which all subcommands are added.
cmd := &cobra.Command{
Use: name,
Short: "Migrate data in the cluster",
Long: migrateLong,
Run: cmdutil.DefaultSubCommandRun(errOut),
}
cmd.AddCommand(cmds...)
return cmd
}