Skip to content

Commit

Permalink
lxd/db/storage/volumes: Removes unused GetStoragePoolVolumesNames fun…
Browse files Browse the repository at this point in the history
…ction

Signed-off-by: Thomas Parrott <[email protected]>
  • Loading branch information
tomponline authored and stgraber committed Aug 16, 2022
1 parent 9932d14 commit 18bccc4
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions lxd/db/storage_volumes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 := `
Expand Down

0 comments on commit 18bccc4

Please sign in to comment.