Documentation ¶
Index ¶
- Constants
- type DirPool
- func (p DirPool) CreateVolume(name string, sizeGB uint64) (*libvirt.StorageVol, error)
- func (p DirPool) DeleteVolume(name string) error
- func (p DirPool) GetDomainDiskXML(name string) libvirtxml.DomainDisk
- func (p DirPool) GetVolumeName(name string) string
- func (p DirPool) ImageFormat() ImageFormat
- func (p DirPool) LookupVolume(name string) (*libvirt.StorageVol, error)
- func (p DirPool) ResizeVolume(name string, newDiskSizeGB uint64) error
- func (p DirPool) Type() StoragePoolType
- type GenericPool
- func (p GenericPool) CreateVolume(name string, sizeGB uint64) (*libvirt.StorageVol, error)
- func (p GenericPool) DeleteVolume(name string) error
- func (p GenericPool) GetDomainDiskXML(name string) libvirtxml.DomainDisk
- func (p GenericPool) GetVolumeName(name string) string
- func (p GenericPool) ImageFormat() ImageFormat
- func (p GenericPool) LookupVolume(name string) (*libvirt.StorageVol, error)
- func (p GenericPool) ResizeVolume(name string, newDiskSizeGB uint64) error
- func (p GenericPool) Type() StoragePoolType
- type ImageFormat
- type StoragePool
- type StoragePoolType
Constants ¶
View Source
const ( StoragePoolTypeGeneric StoragePoolType = "generic" ImageFormatRaw ImageFormat = "raw" )
View Source
const ( StoragePoolTypeDir StoragePoolType = "dir" ImageFormatQcow2 ImageFormat = "qcow2" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirPool ¶
type DirPool struct {
// contains filtered or unexported fields
}
DirPool is a StoragePool of type "dir"
func (DirPool) CreateVolume ¶
func (DirPool) DeleteVolume ¶
func (DirPool) GetDomainDiskXML ¶
func (p DirPool) GetDomainDiskXML(name string) libvirtxml.DomainDisk
func (DirPool) GetVolumeName ¶
func (DirPool) ImageFormat ¶
func (p DirPool) ImageFormat() ImageFormat
func (DirPool) LookupVolume ¶
func (p DirPool) LookupVolume(name string) (*libvirt.StorageVol, error)
func (DirPool) ResizeVolume ¶
func (DirPool) Type ¶
func (p DirPool) Type() StoragePoolType
type GenericPool ¶
type GenericPool struct {
// contains filtered or unexported fields
}
GenericPool is a StoragePool of most pool types other than dir (lvm, gluster, etc)
func NewGenericPool ¶
func NewGenericPool(pool *libvirt.StoragePool) (GenericPool, error)
NewGenericPool creates a wrapper for a generic pool
func (GenericPool) CreateVolume ¶
func (p GenericPool) CreateVolume(name string, sizeGB uint64) (*libvirt.StorageVol, error)
func (GenericPool) DeleteVolume ¶
func (p GenericPool) DeleteVolume(name string) error
func (GenericPool) GetDomainDiskXML ¶
func (p GenericPool) GetDomainDiskXML(name string) libvirtxml.DomainDisk
func (GenericPool) GetVolumeName ¶
func (p GenericPool) GetVolumeName(name string) string
func (GenericPool) ImageFormat ¶
func (p GenericPool) ImageFormat() ImageFormat
func (GenericPool) LookupVolume ¶
func (p GenericPool) LookupVolume(name string) (*libvirt.StorageVol, error)
func (GenericPool) ResizeVolume ¶
func (p GenericPool) ResizeVolume(name string, newDiskSizeGB uint64) error
func (GenericPool) Type ¶
func (p GenericPool) Type() StoragePoolType
type ImageFormat ¶
type ImageFormat string
type StoragePool ¶
type StoragePool interface { CreateVolume(string, uint64) (*libvirt.StorageVol, error) DeleteVolume(string) error GetVolumeName(string) string ResizeVolume(string, uint64) error GetDomainDiskXML(string) libvirtxml.DomainDisk LookupVolume(string) (*libvirt.StorageVol, error) Type() StoragePoolType ImageFormat() ImageFormat }
StoragePool is an interface for the functionality around a type of libvirt.StoragePool
func GetPool ¶
func GetPool(conn *libvirt.Connect) (StoragePool, error)
GetPool retrieves the configured Storage Pool from libvirt
func NewDirPool ¶
func NewDirPool(pool *libvirt.StoragePool) (StoragePool, error)
NewDirPool creates a storage pool of type dir
type StoragePoolType ¶
type StoragePoolType string
Click to show internal directories.
Click to hide internal directories.