mirror of
https://github.com/gravitl/netmaker.git
synced 2025-11-11 01:01:05 +08:00
Merge pull request #1989 from gravitl/GRA-1037-point-to-site
remove point to site from network model
This commit is contained in:
commit
e2dd98d212
4 changed files with 0 additions and 13 deletions
|
|
@ -41,9 +41,6 @@ var networkCreateCmd = &cobra.Command{
|
||||||
if defaultACL {
|
if defaultACL {
|
||||||
network.DefaultACL = "yes"
|
network.DefaultACL = "yes"
|
||||||
}
|
}
|
||||||
if pointToSite {
|
|
||||||
network.IsPointToSite = "yes"
|
|
||||||
}
|
|
||||||
network.DefaultInterface = defaultInterface
|
network.DefaultInterface = defaultInterface
|
||||||
network.DefaultListenPort = int32(defaultListenPort)
|
network.DefaultListenPort = int32(defaultListenPort)
|
||||||
network.NodeLimit = int32(nodeLimit)
|
network.NodeLimit = int32(nodeLimit)
|
||||||
|
|
@ -69,7 +66,6 @@ func init() {
|
||||||
networkCreateCmd.Flags().BoolVar(&udpHolePunch, "udp_hole_punch", false, "Enable UDP Hole Punching ?")
|
networkCreateCmd.Flags().BoolVar(&udpHolePunch, "udp_hole_punch", false, "Enable UDP Hole Punching ?")
|
||||||
networkCreateCmd.Flags().BoolVar(&localNetwork, "local", false, "Is the network local (LAN) ?")
|
networkCreateCmd.Flags().BoolVar(&localNetwork, "local", false, "Is the network local (LAN) ?")
|
||||||
networkCreateCmd.Flags().BoolVar(&defaultACL, "default_acl", false, "Enable default Access Control List ?")
|
networkCreateCmd.Flags().BoolVar(&defaultACL, "default_acl", false, "Enable default Access Control List ?")
|
||||||
networkCreateCmd.Flags().BoolVar(&pointToSite, "point_to_site", false, "Enforce all clients to have only 1 central peer ?")
|
|
||||||
networkCreateCmd.Flags().StringVar(&defaultInterface, "interface", "", "Name of the network interface")
|
networkCreateCmd.Flags().StringVar(&defaultInterface, "interface", "", "Name of the network interface")
|
||||||
networkCreateCmd.Flags().StringVar(&defaultPostUp, "post_up", "", "Commands to run after server is up `;` separated")
|
networkCreateCmd.Flags().StringVar(&defaultPostUp, "post_up", "", "Commands to run after server is up `;` separated")
|
||||||
networkCreateCmd.Flags().StringVar(&defaultPostDown, "post_down", "", "Commands to run after server is down `;` separated")
|
networkCreateCmd.Flags().StringVar(&defaultPostDown, "post_down", "", "Commands to run after server is down `;` separated")
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ var (
|
||||||
udpHolePunch bool
|
udpHolePunch bool
|
||||||
localNetwork bool
|
localNetwork bool
|
||||||
defaultACL bool
|
defaultACL bool
|
||||||
pointToSite bool
|
|
||||||
defaultInterface string
|
defaultInterface string
|
||||||
defaultListenPort int
|
defaultListenPort int
|
||||||
nodeLimit int
|
nodeLimit int
|
||||||
|
|
|
||||||
|
|
@ -44,9 +44,6 @@ var networkUpdateCmd = &cobra.Command{
|
||||||
if defaultACL {
|
if defaultACL {
|
||||||
network.DefaultACL = "yes"
|
network.DefaultACL = "yes"
|
||||||
}
|
}
|
||||||
if pointToSite {
|
|
||||||
network.IsPointToSite = "yes"
|
|
||||||
}
|
|
||||||
network.DefaultInterface = defaultInterface
|
network.DefaultInterface = defaultInterface
|
||||||
network.DefaultListenPort = int32(defaultListenPort)
|
network.DefaultListenPort = int32(defaultListenPort)
|
||||||
network.NodeLimit = int32(nodeLimit)
|
network.NodeLimit = int32(nodeLimit)
|
||||||
|
|
@ -70,7 +67,6 @@ func init() {
|
||||||
networkUpdateCmd.Flags().BoolVar(&udpHolePunch, "udp_hole_punch", false, "Enable UDP Hole Punching ?")
|
networkUpdateCmd.Flags().BoolVar(&udpHolePunch, "udp_hole_punch", false, "Enable UDP Hole Punching ?")
|
||||||
networkUpdateCmd.Flags().BoolVar(&localNetwork, "local", false, "Is the network local (LAN) ?")
|
networkUpdateCmd.Flags().BoolVar(&localNetwork, "local", false, "Is the network local (LAN) ?")
|
||||||
networkUpdateCmd.Flags().BoolVar(&defaultACL, "default_acl", false, "Enable default Access Control List ?")
|
networkUpdateCmd.Flags().BoolVar(&defaultACL, "default_acl", false, "Enable default Access Control List ?")
|
||||||
networkUpdateCmd.Flags().BoolVar(&pointToSite, "point_to_site", false, "Enforce all clients to have only 1 central peer ?")
|
|
||||||
networkUpdateCmd.Flags().StringVar(&defaultInterface, "interface", "", "Name of the network interface")
|
networkUpdateCmd.Flags().StringVar(&defaultInterface, "interface", "", "Name of the network interface")
|
||||||
networkUpdateCmd.Flags().StringVar(&defaultPostUp, "post_up", "", "Commands to run after server is up `;` separated")
|
networkUpdateCmd.Flags().StringVar(&defaultPostUp, "post_up", "", "Commands to run after server is up `;` separated")
|
||||||
networkUpdateCmd.Flags().StringVar(&defaultPostDown, "post_down", "", "Commands to run after server is down `;` separated")
|
networkUpdateCmd.Flags().StringVar(&defaultPostDown, "post_down", "", "Commands to run after server is down `;` separated")
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@ type Network struct {
|
||||||
IsLocal string `json:"islocal" bson:"islocal" validate:"checkyesorno"`
|
IsLocal string `json:"islocal" bson:"islocal" validate:"checkyesorno"`
|
||||||
IsIPv4 string `json:"isipv4" bson:"isipv4" validate:"checkyesorno"`
|
IsIPv4 string `json:"isipv4" bson:"isipv4" validate:"checkyesorno"`
|
||||||
IsIPv6 string `json:"isipv6" bson:"isipv6" validate:"checkyesorno"`
|
IsIPv6 string `json:"isipv6" bson:"isipv6" validate:"checkyesorno"`
|
||||||
IsPointToSite string `json:"ispointtosite" bson:"ispointtosite" validate:"checkyesorno"`
|
|
||||||
DefaultUDPHolePunch string `json:"defaultudpholepunch" bson:"defaultudpholepunch" validate:"checkyesorno"`
|
DefaultUDPHolePunch string `json:"defaultudpholepunch" bson:"defaultudpholepunch" validate:"checkyesorno"`
|
||||||
DefaultExtClientDNS string `json:"defaultextclientdns" bson:"defaultextclientdns"`
|
DefaultExtClientDNS string `json:"defaultextclientdns" bson:"defaultextclientdns"`
|
||||||
DefaultMTU int32 `json:"defaultmtu" bson:"defaultmtu"`
|
DefaultMTU int32 `json:"defaultmtu" bson:"defaultmtu"`
|
||||||
|
|
@ -56,9 +55,6 @@ func (network *Network) SetDefaults() {
|
||||||
if network.IsLocal == "" {
|
if network.IsLocal == "" {
|
||||||
network.IsLocal = "no"
|
network.IsLocal = "no"
|
||||||
}
|
}
|
||||||
if network.IsPointToSite == "" {
|
|
||||||
network.IsPointToSite = "no"
|
|
||||||
}
|
|
||||||
if network.DefaultInterface == "" {
|
if network.DefaultInterface == "" {
|
||||||
if len(network.NetID) < 13 {
|
if len(network.NetID) < 13 {
|
||||||
network.DefaultInterface = "nm-" + network.NetID
|
network.DefaultInterface = "nm-" + network.NetID
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue