Documentation
¶
Index ¶
- Variables
- func AddHyperListener(listen HyperListener)
- func IsDomainPool(name string) bool
- func IsStorePool(name string) bool
- func PoolState2Str(state libvirt.StoragePoolState) string
- func RemoveVolume(pool string, name string) error
- func ToDomainPool(domain string) string
- func VolumeType(t libvirt.StorageVolType) string
- type AllocationXML
- type AvailableXML
- type BackingStoreXML
- type CapacityXML
- type DirXML
- type FormatXML
- type HostXML
- type HyperListener
- type HyperVisor
- type PhysicalXML
- type Pool
- type PoolXML
- type SourceXML
- type TargetXML
- type Volume
- type VolumeInfo
- type VolumeXML
Constants ¶
This section is empty.
Variables ¶
View Source
var (
PoolAll = libvirt.CONNECT_LIST_STORAGE_POOLS_ACTIVE | libvirt.CONNECT_LIST_STORAGE_POOLS_INACTIVE
)
Functions ¶
func AddHyperListener ¶
func AddHyperListener(listen HyperListener)
func IsDomainPool ¶
func IsStorePool ¶
func PoolState2Str ¶
func PoolState2Str(state libvirt.StoragePoolState) string
func RemoveVolume ¶
func ToDomainPool ¶
func VolumeType ¶
func VolumeType(t libvirt.StorageVolType) string
Types ¶
type AllocationXML ¶
type AvailableXML ¶
type BackingStoreXML ¶
type CapacityXML ¶
type HyperListener ¶
type HyperVisor ¶
type HyperVisor struct {
Name string
Conn *libvirt.Connect
Listener []HyperListener
}
func GetHyper ¶
func GetHyper() (*HyperVisor, error)
func SetHyper ¶
func SetHyper(name string) (*HyperVisor, error)
func (*HyperVisor) AddListener ¶
func (h *HyperVisor) AddListener(listen HyperListener)
func (*HyperVisor) Close ¶
func (h *HyperVisor) Close()
func (*HyperVisor) ListAllPools ¶
func (h *HyperVisor) ListAllPools() ([]Pool, error)
func (*HyperVisor) Open ¶
func (h *HyperVisor) Open() error
type PhysicalXML ¶
type Pool ¶
func CreatePool ¶
func LookupPoolByUUID ¶
func LookupPoolByUUIDOrName ¶
func NewPoolFromVir ¶
func NewPoolFromVir(pool *libvirt.StoragePool) *Pool
func (*Pool) ListByTarget ¶
func (pol *Pool) ListByTarget() (map[string]VolumeInfo, error)
type PoolXML ¶
type PoolXML struct {
XMLName xml.Name `xml:"pool" json:"-"`
Type string `xml:"type,attr" json:"type"`
Name string `xml:"name" json:"name"`
UUID string `xml:"uuid" json:"uuid"`
Source SourceXML `xml:"source" json:"source"`
Capacity CapacityXML `xml:"capacity" json:"capacity"`
Allocation AllocationXML `xml:"allocation" json:"allocation"`
Available AvailableXML `xml:"available" json:"available"`
Target TargetXML `xml:"target" json:"target"`
}
type Volume ¶
type Volume struct {
Path string
Pool string
Name string
Size uint64
Format string
BackingFile string
BackingFormat string
}
func CreateBackingVolume ¶
type VolumeInfo ¶
type VolumeXML ¶
type VolumeXML struct {
XMLName xml.Name `xml:"volume" json:"-"`
Name string `xml:"name" json:"name"`
Key string `xml:"key" json:"key"`
Source string `xml:"source" json:"source"`
Capacity CapacityXML `xml:"capacity" json:"capacity"`
Allocation AllocationXML `xml:"allocation" json:"allocation"`
Physical PhysicalXML `xml:"physical" json:"physical"`
Target TargetXML `xml:"target" json:"target"`
BackingStore BackingStoreXML `xml:"backingStore" json:"backingStore"`
}
Click to show internal directories.
Click to hide internal directories.