clustvirt/lib/storagepool/lib.go

55 lines
1.0 KiB
Go
Raw Permalink Normal View History

2024-04-21 17:50:26 +00:00
// Package storagepool provides utilities and data structures in relation to storage pools.
// This library uses the libvirt and libvirtxml packages from libvirt.org to implement
// wrappers on top of the base library
package storagepool
2024-04-21 17:50:26 +00:00
import (
// log "git.staur.ca/stobbsm/simplelog"
// "github.com/gofrs/uuid/v5"
"libvirt.org/go/libvirt"
// "libvirt.org/go/libvirtxml"
)
var StoragePoolStateMap = map[libvirt.StoragePoolState]string{
2024-04-21 17:50:26 +00:00
libvirt.STORAGE_POOL_INACTIVE: "inactive",
libvirt.STORAGE_POOL_BUILDING: "building",
libvirt.STORAGE_POOL_RUNNING: "running",
libvirt.STORAGE_POOL_DEGRADED: "degraded",
libvirt.STORAGE_POOL_INACCESSIBLE: "inaccessible",
}
var Types = []string{
2024-04-21 17:50:26 +00:00
"dir",
"fs",
"netfs",
"disk",
"iscsi",
"logical",
"scsi",
"mpath",
"rbd",
"sheepdog",
"gluster",
"zfs",
"iscsi-direct",
}
var LocalTypes = []string{
2024-04-21 17:50:26 +00:00
"dir",
"fs",
"disk",
"logical",
"scsi",
"zfs",
}
var NetTypes = []string{
2024-04-21 17:50:26 +00:00
"netfs",
"iscsi",
"mpath",
"rbd",
"sheepdog",
"gluster",
"iscsi-direct",
}