forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
import.go
34 lines (26 loc) · 840 Bytes
/
import.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
31
32
33
34
package importer
import (
"fmt"
"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"
)
var (
importLong = templates.LongDesc(`
Import outside applications into OpenShift
These commands assist in bringing existing applications into OpenShift.`)
)
// NewCmdImport exposes commands for modifying objects.
func NewCmdImport(fullName string, f *clientcmd.Factory, in io.Reader, out, errout io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "import COMMAND",
Short: "Commands that import applications",
Long: importLong,
Run: cmdutil.DefaultSubCommandRun(errout),
}
name := fmt.Sprintf("%s import", fullName)
cmd.AddCommand(NewCmdAppJSON(name, f, in, out, errout))
return cmd
}