From 18bccc429dcafede1f4d9b16c96032c520b61e50 Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Tue, 16 Aug 2022 14:55:01 +0100 Subject: [PATCH] lxd/db/storage/volumes: Removes unused GetStoragePoolVolumesNames function Signed-off-by: Thomas Parrott --- lxd/db/storage_volumes.go | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/lxd/db/storage_volumes.go b/lxd/db/storage_volumes.go index 6ded58a69ac0..48ec160f6892 100644 --- a/lxd/db/storage_volumes.go +++ b/lxd/db/storage_volumes.go @@ -17,28 +17,6 @@ import ( "github.com/lxc/lxd/shared/version" ) -// GetStoragePoolVolumesNames gets the names of all storage volumes attached to -// a given storage pool. -func (c *Cluster) GetStoragePoolVolumesNames(poolID int64) ([]string, error) { - var volumeName string - query := "SELECT name FROM storage_volumes_all WHERE storage_pool_id=? AND node_id=?" - inargs := []any{poolID, c.nodeID} - outargs := []any{volumeName} - - result, err := queryScan(c, query, inargs, outargs) - if err != nil { - return []string{}, err - } - - var out []string - - for _, r := range result { - out = append(out, r[0].(string)) - } - - return out, nil -} - // GetStoragePoolVolumesWithType return a list of all volumes of the given type. func (c *ClusterTx) GetStoragePoolVolumesWithType(volumeType int) ([]StorageVolumeArgs, error) { stmt := `