-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Expand file tree
/
Copy pathmigrate.go
More file actions
28 lines (21 loc) · 724 Bytes
/
migrate.go
File metadata and controls
28 lines (21 loc) · 724 Bytes
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
package migrate
import (
"io"
"github.com/spf13/cobra"
cmdutil "github.com/openshift/origin/pkg/cmd/util"
"github.com/openshift/origin/pkg/cmd/util/clientcmd"
)
const MigrateRecommendedName = "migrate"
const migrateLong = `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 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(out),
}
cmd.AddCommand(cmds...)
return cmd
}