add node management

This commit is contained in:
Anish Mukherjee
2022-11-22 18:57:17 +05:30
parent 6a403d1974
commit d9c9d29d33
15 changed files with 469 additions and 0 deletions

20
cli/cmd/node/delete.go Normal file
View File

@@ -0,0 +1,20 @@
package node
import (
"github.com/gravitl/netmaker/cli/functions"
"github.com/spf13/cobra"
)
var nodeDeleteCmd = &cobra.Command{
Use: "delete [NETWORK NAME] [NODE ID]",
Args: cobra.ExactArgs(2),
Short: "Delete a Node",
Long: `Delete a Node`,
Run: func(cmd *cobra.Command, args []string) {
functions.PrettyPrint(functions.DeleteNode(args[0], args[1]))
},
}
func init() {
rootCmd.AddCommand(nodeDeleteCmd)
}