func (r *ProtocolLXD) GetNetworkNames() ([]string, error) {
	if !r.HasExtension("network") {
		return nil, fmt.Errorf("The server is missing the required \"network\" API extension")
	}
	urls := []string{}
	_, err := r.queryStruct("GET", "/networks", nil, "", &urls)
	if err != nil {
		return nil, err
	}
	names := []string{}
	for _, url := range urls {
		fields := strings.Split(url, "/networks/")
		names = append(names, fields[len(fields)-1])
	}
	return names, nil
}
GetNetworkNames returns a list of network names
package lxd
import (
	"fmt"
	"net/url"
	"strings"
	"github.com/lxc/lxd/shared/api"
)