mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 09:22:42 +08:00

* feat(go): add deprecation warning. * feat(go): add support for gateway commands. * feat(go): mention the server version in which the commands were deprecated.
24 lines
631 B
Go
24 lines
631 B
Go
package node
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/gravitl/netmaker/cli/functions"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var hostCreateRelayCmd = &cobra.Command{
|
|
Use: "create_relay [NETWORK][NODE ID] [RELAYED NODE IDS (comma separated)]",
|
|
Args: cobra.ExactArgs(3),
|
|
Short: "Turn a Node into a Relay",
|
|
Long: `Turn a Node into a Relay`,
|
|
Deprecated: "in favour of the `gateway` subcommand, in Netmaker v0.90.0.",
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
functions.PrettyPrint(functions.CreateRelay(args[0], args[1], strings.Split(args[2], ",")))
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(hostCreateRelayCmd)
|
|
}
|