client/lxd_storage_volumes.go
func (r *ProtocolLXD) GetStoragePoolVolumeSnapshot(pool string, volumeType string, volumeName string, snapshotName string) (*api.StorageVolumeSnapshot, string, error) {
	if !r.HasExtension("storage_api_volume_snapshots") {
		return nil, "", fmt.Errorf("The server is missing the required \"storage_api_volume_snapshots\" API extension")
	}

	snapshot := api.StorageVolumeSnapshot{}

	path := fmt.Sprintf("/storage-pools/%s/volumes/%s/%s/snapshots/%s",
		url.QueryEscape(pool),
		url.QueryEscape(volumeType),
		url.QueryEscape(volumeName),
		url.QueryEscape(snapshotName))
	etag, err := r.queryStruct("GET", path, nil, "", &snapshot)
	if err != nil {
		return nil, "", err
	}

	return &snapshot, etag, nil
}
func (r *ProtocolLXD) GetStoragePoolVolumeSnapshot(pool string, volumeType string, volumeName string, snapshotName string) (*api.StorageVolumeSnapshot, string, error) {
	if !r.HasExtension("storage_api_volume_snapshots") {
		return nil, "", fmt.Errorf("The server is missing the required \"storage_api_volume_snapshots\" API extension")
	}

	snapshot := api.StorageVolumeSnapshot{}

	path := fmt.Sprintf("/storage-pools/%s/volumes/%s/%s/snapshots/%s",
		url.QueryEscape(pool),
		url.QueryEscape(volumeType),
		url.QueryEscape(volumeName),
		url.QueryEscape(snapshotName))
	etag, err := r.queryStruct("GET", path, nil, "", &snapshot)
	if err != nil {
		return nil, "", err
	}

	return &snapshot, etag, nil
}
func ( r * ProtocolLXD ) GetStoragePoolVolumeSnapshot ( pool string , volumeType string , volumeName string , snapshotName string ) ( * api . StorageVolumeSnapshot , string , error ) { if ! r . HasExtension ( " " ) { return nil , " " , fmt . Errorf ( " \" \" " ) } snapshot := api . StorageVolumeSnapshot { } path := fmt . Sprintf ( " " , url . QueryEscape ( pool ) , url . QueryEscape ( volumeType ) , url . QueryEscape ( volumeName ) , url . QueryEscape ( snapshotName ) ) etag , err := r . queryStruct ( " " , path , nil , " " , & snapshot ) if err != nil { return nil , " " , err } return & snapshot , etag , nil }
// GetStoragePoolVolumeSnapshot returns a snapshots for the storage volume
GetStoragePoolVolumeSnapshot returns a snapshots for the storage volume