mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-04 16:33:49 +08:00
change version of ubuntu
This commit is contained in:
@@ -158,6 +158,8 @@ func Uninstall() error {
|
||||
daemon.CleanupWindows()
|
||||
} else if ncutils.IsMac() {
|
||||
daemon.CleanupMac()
|
||||
} else if ncutils.IsLinux() {
|
||||
daemon.CleanupLinux()
|
||||
} else if !ncutils.IsKernel() {
|
||||
ncutils.PrintLog("manual cleanup required", 1)
|
||||
}
|
||||
@@ -255,32 +257,6 @@ func DeleteInterface(ifacename string, postdown string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// List - lists all networks on local machine
|
||||
func List() error {
|
||||
|
||||
networks, err := ncutils.GetSystemNetworks()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, network := range networks {
|
||||
cfg, err := config.ReadConfig(network)
|
||||
if err == nil {
|
||||
jsoncfg, _ := json.Marshal(
|
||||
map[string]string{
|
||||
"Name": cfg.Node.Name,
|
||||
"Interface": cfg.Node.Interface,
|
||||
"PrivateIPv4": cfg.Node.Address,
|
||||
"PrivateIPv6": cfg.Node.Address6,
|
||||
"PublicEndpoint": cfg.Node.Endpoint,
|
||||
})
|
||||
fmt.Println(network + ": " + string(jsoncfg))
|
||||
} else {
|
||||
ncutils.PrintLog(network+": Could not retrieve network configuration.", 1)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// WipeLocal - wipes local instance
|
||||
func WipeLocal(network string) error {
|
||||
cfg, err := config.ReadConfig(network)
|
||||
|
Reference in New Issue
Block a user