func (l *LXO) UpdateContainer(id string, container api.ContainerPut, etag string) error {
	op, err := l.server.UpdateContainer(id, container, etag)
	if err != nil {
		return err
	}
	return op.Wait()
}
UpdateContainer will create the container and wait till operation is done or
return an error
package lxo  
import (
	lxd "github.com/lxc/lxd/client"
	"github.com/lxc/lxd/shared/api"
)
func (l *LXO) StopContainer(id string, timeout, retries int) error {
	var (
		err  error
		etag string
	)
	for i := 0; i <= retries; i++ {
		lxdReq := api.ContainerStatePut{
			Action:  "stop",
			Timeout: timeout,
			Force:   i == retries,
		}
		var op lxd.Operation
		op, err = l.server.UpdateContainerState(id, lxdReq, etag)
		if err != nil {
			return err
		}
		err = op.Wait()
		if err != nil {
			if err.Error() == "The container is already stopped" {
				return nil
			}
		} else {
			return nil
		}
	}
	return err
}
func (l *LXO) StartContainer(id string) error {
	ETag := ""
	lxdReq := api.ContainerStatePut{
		Action:  "start",
		Timeout: -1,
	}
	op, err := l.server.UpdateContainerState(id, lxdReq, ETag)
	if err != nil {
		return err
	}
	return op.Wait()
}
func (l *LXO) CreateContainer(container api.ContainersPost) error {
	op, err := l.server.CreateContainer(container)
	if err != nil {
		return err
	}
	return op.Wait()
}