lxd/db/storage_pools.go
func (c *Cluster) StoragePoolVolumesGetNames(poolID int64) ([]string, error) {
	var volumeName string
	query := "SELECT name FROM storage_volumes WHERE storage_pool_id=? AND node_id=?"
	inargs := []interface{}{poolID, c.nodeID}
	outargs := []interface{}{volumeName}

	result, err := queryScan(c.db, 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
}
func (c *Cluster) StoragePoolVolumesGetNames(poolID int64) ([]string, error) {
	var volumeName string
	query := "SELECT name FROM storage_volumes WHERE storage_pool_id=? AND node_id=?"
	inargs := []interface{}{poolID, c.nodeID}
	outargs := []interface{}{volumeName}

	result, err := queryScan(c.db, 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
}
func ( c * Cluster ) StoragePoolVolumesGetNames ( poolID int64 ) ( [ ] string , error ) { var volumeName string query := " " inargs := [ ] interface { } { poolID , c . nodeID } outargs := [ ] interface { } { volumeName } result , err := queryScan ( c . db , 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 }
// StoragePoolVolumesGetNames gets the names of all storage volumes attached to
// a given storage pool.
StoragePoolVolumesGetNames gets the names of all storage volumes attached to a given storage pool .