mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-13 08:34:44 +08:00
27 lines
597 B
Go
27 lines
597 B
Go
package network
|
|
|
|
import (
|
|
"log"
|
|
"strconv"
|
|
|
|
"github.com/gravitl/netmaker/cli/functions"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var networkNodeLimitCmd = &cobra.Command{
|
|
Use: "node_limit [NAME] [NEW LIMIT]",
|
|
Short: "Update network nodel limit",
|
|
Long: `Update network nodel limit`,
|
|
Args: cobra.ExactArgs(2),
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
nodelimit, err := strconv.ParseInt(args[1], 10, 32)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
functions.PrettyPrint(functions.UpdateNetworkNodeLimit(args[0], int32(nodelimit)))
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(networkNodeLimitCmd)
|
|
}
|