func (r *ProtocolLXD) CreateStoragePool(pool api.StoragePoolsPost) error {
	if !r.HasExtension("storage") {
		return fmt.Errorf("The server is missing the required \"storage\" API extension")
	}
	if pool.Driver == "ceph" && !r.HasExtension("storage_driver_ceph") {
		return fmt.Errorf("The server is missing the required \"storage_driver_ceph\" API extension")
	}
	path := "/storage-pools"
	if r.clusterTarget != "" {
		path += fmt.Sprintf("?target=%s", r.clusterTarget)
	}
	_, _, err := r.query("POST", path, pool, "")
	if err != nil {
		return err
	}
	return nil
}
CreateStoragePool defines a new storage pool using the provided StoragePool struct
package lxd
import (
	"fmt"
	"net/url"
	"strings"
	"github.com/lxc/lxd/shared/api"
)
func (r *ProtocolLXD) GetStoragePoolNames() ([]string, error) {
	if !r.HasExtension("storage") {
		return nil, fmt.Errorf("The server is missing the required \"storage\" API extension")
	}
	urls := []string{}
	_, err := r.queryStruct("GET", "/storage-pools", nil, "", &urls)
	if err != nil {
		return nil, err
	}
	names := []string{}
	for _, url := range urls {
		fields := strings.Split(url, "/storage-pools/")
		names = append(names, fields[len(fields)-1])
	}
	return names, nil
}
func (r *ProtocolLXD) GetStoragePools() ([]api.StoragePool, error) {
	if !r.HasExtension("storage") {
		return nil, fmt.Errorf("The server is missing the required \"storage\" API extension")
	}
	pools := []api.StoragePool{}
	_, err := r.queryStruct("GET", "/storage-pools?recursion=1", nil, "", &pools)
	if err != nil {
		return nil, err
	}
	return pools, nil
}
func (r *ProtocolLXD) GetStoragePool(name string) (*api.StoragePool, string, error) {
	if !r.HasExtension("storage") {
		return nil, "", fmt.Errorf("The server is missing the required \"storage\" API extension")
	}
	pool := api.StoragePool{}
	path := fmt.Sprintf("/storage-pools/%s", url.QueryEscape(name))
	if r.clusterTarget != "" {
		path += fmt.Sprintf("?target=%s", r.clusterTarget)
	}
	etag, err := r.queryStruct("GET", path, nil, "", &pool)
	if err != nil {
		return nil, "", err
	}
	return &pool, etag, nil
}