forked from libopenstorage/stork
/
create.go
30 lines (26 loc) · 1.01 KB
/
create.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 storkctl
import (
"github.com/spf13/cobra"
"k8s.io/cli-runtime/pkg/genericclioptions"
)
func newCreateCommand(cmdFactory Factory, ioStreams genericclioptions.IOStreams) *cobra.Command {
createCommands := &cobra.Command{
Use: "create",
Short: "Create stork resources",
}
createCommands.AddCommand(
newCreateSnapshotCommand(cmdFactory, ioStreams),
newCreateMigrationCommand(cmdFactory, ioStreams),
newCreateMigrationScheduleCommand(cmdFactory, ioStreams),
newCreatePVCCommand(cmdFactory, ioStreams),
newCreateSnapshotScheduleCommand(cmdFactory, ioStreams),
newCreateGroupSnapshotCommand(cmdFactory, ioStreams),
newCreateVolumeSnapshotRestoreCommand(cmdFactory, ioStreams),
newCreateApplicationBackupCommand(cmdFactory, ioStreams),
newCreateApplicationBackupScheduleCommand(cmdFactory, ioStreams),
newCreateApplicationRestoreCommand(cmdFactory, ioStreams),
newCreateApplicationCloneCommand(cmdFactory, ioStreams),
newCreateClusterPairCommand(cmdFactory, ioStreams),
)
return createCommands
}