mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-07 20:38:51 +08:00
NET-1050: change ingress refs in NMCTL to remote access gateways (#2852)
This commit is contained in:
parent
8175a0e240
commit
3b533952df
3 changed files with 11 additions and 9 deletions
|
@ -6,10 +6,11 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var nodeCreateIngressCmd = &cobra.Command{
|
var nodeCreateIngressCmd = &cobra.Command{
|
||||||
Use: "create_ingress [NETWORK NAME] [NODE ID]",
|
Use: "create_remote_access_gateway [NETWORK NAME] [NODE ID]",
|
||||||
Args: cobra.ExactArgs(2),
|
Args: cobra.ExactArgs(2),
|
||||||
Short: "Turn a Node into a Ingress",
|
Short: "Turn a Node into a Remote Access Gateway (Ingress)",
|
||||||
Long: `Turn a Node into a Ingress`,
|
Long: `Turn a Node into a Remote Access Gateway (Ingress) for a Network.`,
|
||||||
|
Aliases: []string{"create_rag"},
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
functions.PrettyPrint(functions.CreateIngress(args[0], args[1], failover))
|
functions.PrettyPrint(functions.CreateIngress(args[0], args[1], failover))
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,10 +6,11 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var nodeDeleteIngressCmd = &cobra.Command{
|
var nodeDeleteIngressCmd = &cobra.Command{
|
||||||
Use: "delete_ingress [NETWORK NAME] [NODE ID]",
|
Use: "delete_remote_access_gateway [NETWORK NAME] [NODE ID]",
|
||||||
Args: cobra.ExactArgs(2),
|
Args: cobra.ExactArgs(2),
|
||||||
Short: "Delete Ingress role from a Node",
|
Short: "Delete Remote Access Gateway role from a Node",
|
||||||
Long: `Delete Ingress role from a Node`,
|
Long: `Delete Remote Access Gateway role from a Node`,
|
||||||
|
Aliases: []string{"delete_rag"},
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
functions.PrettyPrint(functions.DeleteIngress(args[0], args[1]))
|
functions.PrettyPrint(functions.DeleteIngress(args[0], args[1]))
|
||||||
},
|
},
|
||||||
|
|
|
@ -29,7 +29,7 @@ var nodeListCmd = &cobra.Command{
|
||||||
functions.PrettyPrint(data)
|
functions.PrettyPrint(data)
|
||||||
default:
|
default:
|
||||||
table := tablewriter.NewWriter(os.Stdout)
|
table := tablewriter.NewWriter(os.Stdout)
|
||||||
table.SetHeader([]string{"ID", "Addresses", "Network", "Egress", "Ingress", "Relay"})
|
table.SetHeader([]string{"ID", "Addresses", "Network", "Egress", "Remote Access Gateway", "Relay"})
|
||||||
for _, d := range data {
|
for _, d := range data {
|
||||||
addresses := ""
|
addresses := ""
|
||||||
if d.Address != "" {
|
if d.Address != "" {
|
||||||
|
|
Loading…
Add table
Reference in a new issue