lxd/db/storage_pools.go
func (c *Cluster) StoragePoolVolumeDelete(project, volumeName string, volumeType int, poolID int64) error {
	volumeID, _, err := c.StoragePoolNodeVolumeGetTypeByProject(project, volumeName, volumeType, poolID)
	if err != nil {
		return err
	}

	err = c.Transaction(func(tx *ClusterTx) error {
		err := storagePoolVolumeReplicateIfCeph(tx.tx, volumeID, project, volumeName, volumeType, poolID, func(volumeID int64) error {
			_, err := tx.tx.Exec("DELETE FROM storage_volumes WHERE id=?", volumeID)
			return err
		})
		return err
	})

	return err
}
func (c *Cluster) StoragePoolVolumeDelete(project, volumeName string, volumeType int, poolID int64) error {
	volumeID, _, err := c.StoragePoolNodeVolumeGetTypeByProject(project, volumeName, volumeType, poolID)
	if err != nil {
		return err
	}

	err = c.Transaction(func(tx *ClusterTx) error {
		err := storagePoolVolumeReplicateIfCeph(tx.tx, volumeID, project, volumeName, volumeType, poolID, func(volumeID int64) error {
			_, err := tx.tx.Exec("DELETE FROM storage_volumes WHERE id=?", volumeID)
			return err
		})
		return err
	})

	return err
}
func ( c * Cluster ) StoragePoolVolumeDelete ( project , volumeName string , volumeType int , poolID int64 ) error { volumeID , _ , err := c . StoragePoolNodeVolumeGetTypeByProject ( project , volumeName , volumeType , poolID ) if err != nil { return err } err = c . Transaction ( func ( tx * ClusterTx ) error { err := storagePoolVolumeReplicateIfCeph ( tx . tx , volumeID , project , volumeName , volumeType , poolID , func ( volumeID int64 ) error { _ , err := tx . tx . Exec ( " " , volumeID ) return err } ) return err } ) return err }
// StoragePoolVolumeDelete deletes the storage volume attached to a given storage
// pool.
StoragePoolVolumeDelete deletes the storage volume attached to a given storage pool .