mirror of
				https://github.com/gravitl/netmaker.git
				synced 2025-10-25 13:37:00 +08:00 
			
		
		
		
	* revert relays * initial relay commit * get relayed allowed ips * add more relay validation checks, peer logic cleanup * rm relayed nodes from relay node when relayed node is deleted * fix egress updates for relayed nodes * rm unused func * remove debug logs * avoid adding egress ranges on the relayed gw node --------- Co-authored-by: Matthew R Kasun <mkasun@nusak.ca>
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			535 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			535 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`,
 | |
| 	Run: func(cmd *cobra.Command, args []string) {
 | |
| 		functions.PrettyPrint(functions.CreateRelay(args[0], args[1], strings.Split(args[2], ",")))
 | |
| 	},
 | |
| }
 | |
| 
 | |
| func init() {
 | |
| 	rootCmd.AddCommand(hostCreateRelayCmd)
 | |
| }
 |