lxd/db/networks.go
func (c *Cluster) NetworkUpdate(name, description string, config map[string]string) error {
	id, _, err := c.NetworkGet(name)
	if err != nil {
		return err
	}

	err = c.Transaction(func(tx *ClusterTx) error {
		err = NetworkUpdateDescription(tx.tx, id, description)
		if err != nil {
			return err
		}

		err = NetworkConfigClear(tx.tx, id, c.nodeID)
		if err != nil {
			return err
		}

		err = networkConfigAdd(tx.tx, id, c.nodeID, config)
		if err != nil {
			return err
		}
		return nil
	})

	return err
}
func (c *Cluster) NetworkUpdate(name, description string, config map[string]string) error {
	id, _, err := c.NetworkGet(name)
	if err != nil {
		return err
	}

	err = c.Transaction(func(tx *ClusterTx) error {
		err = NetworkUpdateDescription(tx.tx, id, description)
		if err != nil {
			return err
		}

		err = NetworkConfigClear(tx.tx, id, c.nodeID)
		if err != nil {
			return err
		}

		err = networkConfigAdd(tx.tx, id, c.nodeID, config)
		if err != nil {
			return err
		}
		return nil
	})

	return err
}
// NetworkUpdate updates the network with the given name.