misc improvements

This commit is contained in:
Finn 2024-12-02 22:57:21 -08:00
parent 966730080c
commit e88bf31634
9 changed files with 143 additions and 55 deletions

View file

@ -1,8 +1,6 @@
package pools
import (
"fmt"
"libvirt.org/go/libvirt"
"libvirt.org/go/libvirtxml"
)
@ -52,7 +50,7 @@ func (p GenericPool) DeleteVolume(name string) error {
}
func (p GenericPool) GetVolumeName(name string) string {
return fmt.Sprintf("rhyzome-%s", name)
return name
}
func (p GenericPool) ResizeVolume(name string, newDiskSizeGB uint64) error {

View file

@ -30,7 +30,7 @@ var drivers = map[string]func(*libvirt.StoragePool) (StoragePool, error){}
// GetPool retrieves the configured Storage Pool from libvirt
func GetPool(conn *libvirt.Connect) (StoragePool, error) {
pool, err := conn.LookupStoragePoolByName(config.C.DiskStoragePool)
pool, err := conn.LookupStoragePoolByName(config.C.StoragePool)
if err != nil {
return nil, err
}