client/lxd_operations.go
func (r *ProtocolLXD) GetOperations() ([]api.Operation, error) {
	apiOperations := map[string][]api.Operation{}

	// Fetch the raw value
	_, err := r.queryStruct("GET", "/operations?recursion=1", nil, "", &apiOperations)
	if err != nil {
		return nil, err
	}

	// Turn it into just a list of operations
	operations := []api.Operation{}
	for _, v := range apiOperations {
		for _, operation := range v {
			operations = append(operations, operation)
		}
	}

	return operations, nil
}
func (r *ProtocolLXD) GetOperations() ([]api.Operation, error) {
	apiOperations := map[string][]api.Operation{}

	// Fetch the raw value
	_, err := r.queryStruct("GET", "/operations?recursion=1", nil, "", &apiOperations)
	if err != nil {
		return nil, err
	}

	// Turn it into just a list of operations
	operations := []api.Operation{}
	for _, v := range apiOperations {
		for _, operation := range v {
			operations = append(operations, operation)
		}
	}

	return operations, nil
}
func ( r * ProtocolLXD ) GetOperations ( ) ( [ ] api . Operation , error ) { apiOperations := map [ string ] [ ] api . Operation { } // Fetch the raw value _ , err := r . queryStruct ( " " , " " , nil , " " , & apiOperations ) if err != nil { return nil , err } // Turn it into just a list of operations operations := [ ] api . Operation { } for _ , v := range apiOperations { for _ , operation := range v { operations = append ( operations , operation ) } } return operations , nil }
// GetOperations returns a list of Operation struct
GetOperations returns a list of Operation struct