func (r *ProtocolLXD) GetOperation(uuid string) (*api.Operation, string, error) {
	op := api.Operation{}
	etag, err := r.queryStruct("GET", fmt.Sprintf("/operations/%s", url.QueryEscape(uuid)), nil, "", &op)
	if err != nil {
		return nil, "", err
	}
	return &op, etag, nil
}
GetOperation returns an Operation entry for the provided uuid
package lxd
import (
	"fmt"
	"net/url"
	"strings"
	"github.com/gorilla/websocket"
	"github.com/lxc/lxd/shared/api"
)
func (r *ProtocolLXD) GetOperationUUIDs() ([]string, error) {
	urls := []string{}
	_, err := r.queryStruct("GET", "/operations", nil, "", &urls)
	if err != nil {
		return nil, err
	}
	uuids := []string{}
	for _, url := range urls {
		fields := strings.Split(url, "/operations/")
		uuids = append(uuids, fields[len(fields)-1])
	}
	return uuids, nil
}
func (r *ProtocolLXD) GetOperations() ([]api.Operation, error) {
	apiOperations := map[string][]api.Operation{}
	_, err := r.queryStruct("GET", "/operations?recursion=1", nil, "", &apiOperations)
	if err != nil {
		return nil, err
	}
	operations := []api.Operation{}
	for _, v := range apiOperations {
		for _, operation := range v {
			operations = append(operations, operation)
		}
	}
	return operations, nil
}