API updates and fixes to CLI

This commit is contained in:
Gregory Kurtzer
2020-12-01 23:34:24 -08:00
parent 2f5fa95d14
commit 43ad7e570c
26 changed files with 168 additions and 163 deletions

View File

@@ -4,19 +4,19 @@ import "github.com/spf13/cobra"
var (
baseCmd = &cobra.Command{
Use: "add",
Short: "Add new node",
Long: "Add new node ",
RunE: CobraRunE,
Args: cobra.MinimumNArgs(1),
Use: "add",
Short: "Add new node",
Long: "Add new node ",
RunE: CobraRunE,
Args: cobra.MinimumNArgs(1),
}
SetGroup string
SetGroup string
SetController string
)
func init() {
baseCmd.PersistentFlags().StringVarP(&SetGroup, "group", "g", "default", "Group to add nodes to")
baseCmd.PersistentFlags().StringVarP(&SetController, "controller", "c", "default", "Controller to add nodes to")
baseCmd.PersistentFlags().StringVarP(&SetController, "controller", "c", "localhost", "Controller to add nodes to")
}
// GetRootCommand returns the root cobra.Command for the application.