From 4e3ff513b7cfbf08dc561f15f28800de2d62351f Mon Sep 17 00:00:00 2001 From: Matthew R Kasun Date: Mon, 30 Jan 2023 10:47:40 -0500 Subject: [PATCH 1/2] remove point to site from network model --- models/network.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/models/network.go b/models/network.go index 7eb67d2a..fd6a9f8c 100644 --- a/models/network.go +++ b/models/network.go @@ -25,7 +25,6 @@ type Network struct { IsLocal string `json:"islocal" bson:"islocal" validate:"checkyesorno"` IsIPv4 string `json:"isipv4" bson:"isipv4" 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"` DefaultExtClientDNS string `json:"defaultextclientdns" bson:"defaultextclientdns"` DefaultMTU int32 `json:"defaultmtu" bson:"defaultmtu"` @@ -56,9 +55,6 @@ func (network *Network) SetDefaults() { if network.IsLocal == "" { network.IsLocal = "no" } - if network.IsPointToSite == "" { - network.IsPointToSite = "no" - } if network.DefaultInterface == "" { if len(network.NetID) < 13 { network.DefaultInterface = "nm-" + network.NetID From 92af578ab1660691fb22ee6c56ba8610f49b5a27 Mon Sep 17 00:00:00 2001 From: Matthew R Kasun Date: Mon, 30 Jan 2023 11:04:22 -0500 Subject: [PATCH 2/2] remove point to site from nmctl --- cli/cmd/network/create.go | 4 ---- cli/cmd/network/flags.go | 1 - cli/cmd/network/update.go | 4 ---- 3 files changed, 9 deletions(-) diff --git a/cli/cmd/network/create.go b/cli/cmd/network/create.go index 10615eed..08c17e5f 100644 --- a/cli/cmd/network/create.go +++ b/cli/cmd/network/create.go @@ -41,9 +41,6 @@ var networkCreateCmd = &cobra.Command{ if defaultACL { network.DefaultACL = "yes" } - if pointToSite { - network.IsPointToSite = "yes" - } network.DefaultInterface = defaultInterface network.DefaultListenPort = int32(defaultListenPort) 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(&localNetwork, "local", false, "Is the network local (LAN) ?") 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(&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") diff --git a/cli/cmd/network/flags.go b/cli/cmd/network/flags.go index 38c1448d..286c8fbb 100644 --- a/cli/cmd/network/flags.go +++ b/cli/cmd/network/flags.go @@ -8,7 +8,6 @@ var ( udpHolePunch bool localNetwork bool defaultACL bool - pointToSite bool defaultInterface string defaultListenPort int nodeLimit int diff --git a/cli/cmd/network/update.go b/cli/cmd/network/update.go index e171487b..93ae9f26 100644 --- a/cli/cmd/network/update.go +++ b/cli/cmd/network/update.go @@ -44,9 +44,6 @@ var networkUpdateCmd = &cobra.Command{ if defaultACL { network.DefaultACL = "yes" } - if pointToSite { - network.IsPointToSite = "yes" - } network.DefaultInterface = defaultInterface network.DefaultListenPort = int32(defaultListenPort) 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(&localNetwork, "local", false, "Is the network local (LAN) ?") 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(&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")