MCPcopy Create free account
hub / github.com/crc-org/crc-cloud / GetCreateCmd

Function GetCreateCmd

cmd/cmd/create/create.go:15–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13)
14
15func GetCreateCmd() *cobra.Command {
16 createCmd := &cobra.Command{
17 Use: createCmdName,
18 Short: createCmdDescription,
19 RunE: func(cmd *cobra.Command, _ []string) error {
20 if err := viper.BindPFlags(cmd.Flags()); err != nil {
21 return err
22 }
23 return nil
24 },
25 }
26 flagSet := pflag.NewFlagSet(createCmdName, pflag.ExitOnError)
27 // Fixed params
28 flagSet.StringP(constants.ProjectName, "", "", constants.ProjectNameDesc)
29 flagSet.StringP(constants.BackedURL, "", "", constants.BackedURLDesc)
30 flagSet.StringP(constants.OutputFolder, "", "", constants.OutputFolderDesc)
31 flagSet.StringToStringP(constants.Tags, "", nil, constants.TagsDesc)
32 flagSet.StringP(constants.OcpPullSecretFilePath, "", "", constants.OcpPullSecretFilePathDesc)
33 flagSet.StringP(constants.KeyFilePath, "", "", constants.KeyFilePathDesc)
34 createCmd.PersistentFlags().AddFlagSet(flagSet)
35
36 createCmd.AddCommand(getAWSProviderCmd())
37 createCmd.AddCommand(getGCPProviderCmd())
38 createCmd.AddCommand(getOpenStackProviderCmd())
39 createCmd.AddCommand(getUPIProviderCmd())
40
41 return createCmd
42}

Callers 1

initFunction · 0.92

Calls 3

getAWSProviderCmdFunction · 0.85
getGCPProviderCmdFunction · 0.85
getOpenStackProviderCmdFunction · 0.85

Tested by

no test coverage detected