mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-08 14:15:25 +08:00
pr comments
This commit is contained in:
parent
7be2771ea8
commit
98c70e8a20
2 changed files with 3 additions and 6 deletions
|
@ -15,10 +15,9 @@ var nodeCreateEgressCmd = &cobra.Command{
|
|||
Long: `Turn a Node into a Egress`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
egress := &models.EgressGatewayRequest{
|
||||
NetID: args[0],
|
||||
NodeID: args[1],
|
||||
Interface: networkInterface,
|
||||
Ranges: strings.Split(args[2], ","),
|
||||
NetID: args[0],
|
||||
NodeID: args[1],
|
||||
Ranges: strings.Split(args[2], ","),
|
||||
}
|
||||
if natEnabled {
|
||||
egress.NatEnabled = "yes"
|
||||
|
@ -28,7 +27,6 @@ var nodeCreateEgressCmd = &cobra.Command{
|
|||
}
|
||||
|
||||
func init() {
|
||||
nodeCreateEgressCmd.Flags().StringVar(&networkInterface, "interface", "", "Network interface name (ex:- eth0)")
|
||||
nodeCreateEgressCmd.Flags().BoolVar(&natEnabled, "nat", false, "Enable NAT for Egress Traffic ?")
|
||||
rootCmd.AddCommand(nodeCreateEgressCmd)
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package node
|
||||
|
||||
var (
|
||||
networkInterface string
|
||||
natEnabled bool
|
||||
failover bool
|
||||
networkName string
|
||||
|
|
Loading…
Add table
Reference in a new issue