mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-10 15:14:22 +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`,
|
Long: `Turn a Node into a Egress`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
egress := &models.EgressGatewayRequest{
|
egress := &models.EgressGatewayRequest{
|
||||||
NetID: args[0],
|
NetID: args[0],
|
||||||
NodeID: args[1],
|
NodeID: args[1],
|
||||||
Interface: networkInterface,
|
Ranges: strings.Split(args[2], ","),
|
||||||
Ranges: strings.Split(args[2], ","),
|
|
||||||
}
|
}
|
||||||
if natEnabled {
|
if natEnabled {
|
||||||
egress.NatEnabled = "yes"
|
egress.NatEnabled = "yes"
|
||||||
|
@ -28,7 +27,6 @@ var nodeCreateEgressCmd = &cobra.Command{
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
nodeCreateEgressCmd.Flags().StringVar(&networkInterface, "interface", "", "Network interface name (ex:- eth0)")
|
|
||||||
nodeCreateEgressCmd.Flags().BoolVar(&natEnabled, "nat", false, "Enable NAT for Egress Traffic ?")
|
nodeCreateEgressCmd.Flags().BoolVar(&natEnabled, "nat", false, "Enable NAT for Egress Traffic ?")
|
||||||
rootCmd.AddCommand(nodeCreateEgressCmd)
|
rootCmd.AddCommand(nodeCreateEgressCmd)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package node
|
package node
|
||||||
|
|
||||||
var (
|
var (
|
||||||
networkInterface string
|
|
||||||
natEnabled bool
|
natEnabled bool
|
||||||
failover bool
|
failover bool
|
||||||
networkName string
|
networkName string
|
||||||
|
|
Loading…
Add table
Reference in a new issue