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

22
cli/cmd/node/uncordon.go Normal file
View File

@@ -0,0 +1,22 @@
package node
import (
"fmt"
"github.com/gravitl/netmaker/cli/functions"
"github.com/spf13/cobra"
)
var nodeUncordonCmd = &cobra.Command{
Use: "uncordon [NETWORK NAME] [NODE ID]",
Args: cobra.ExactArgs(2),
Short: "Get a node by ID",
Long: `Get a node by ID`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(*functions.UncordonNode(args[0], args[1]))
},
}
func init() {
rootCmd.AddCommand(nodeUncordonCmd)
}