Documentation
¶
Index ¶
- Variables
- func AddHyperListener(listen HyperListener)
- func IsDomainPool(name string) bool
- func PoolState2Str(state libvirt.StoragePoolState) string
- func RemovePool(name string) error
- func RemoveVolume(pool string, name string) error
- func ToDomainPool(domain string) string
- type AllocationXML
- type AvailableXML
- type CapacityXML
- type DataStore
- type DataStoreMgr
- type FormatXML
- type HyperListener
- type HyperVisor
- type IsoFile
- type IsoMgr
- type PhysicalXML
- type Pool
- type PoolXML
- type TargetXML
- type Volume
- type VolumeXML
Constants ¶
This section is empty.
Variables ¶
View Source
var DATASTOR = DataStoreMgr{ Storage: make([]DataStore, 0, 32), }
View Source
var ISO = IsoMgr{ Files: make([]IsoFile, 0, 32), }
View Source
var (
POOL_ALL = libvirt.CONNECT_LIST_STORAGE_POOLS_ACTIVE | libvirt.CONNECT_LIST_STORAGE_POOLS_INACTIVE
)
Functions ¶
func AddHyperListener ¶
func AddHyperListener(listen HyperListener)
func IsDomainPool ¶
func PoolState2Str ¶ added in v0.2.23
func PoolState2Str(state libvirt.StoragePoolState) string
func RemovePool ¶
func RemoveVolume ¶
func ToDomainPool ¶
Types ¶
type AllocationXML ¶
type AvailableXML ¶
type CapacityXML ¶
type DataStoreMgr ¶
type DataStoreMgr struct {
Storage []DataStore `json:"storage"`
}
func (*DataStoreMgr) Init ¶
func (store *DataStoreMgr) Init()
func (*DataStoreMgr) List ¶
func (store *DataStoreMgr) List() []DataStore
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 ¶ added in v0.2.23
func (h *HyperVisor) ListAllPools() ([]Pool, error)
func (*HyperVisor) Open ¶
func (h *HyperVisor) Open() error
type PhysicalXML ¶
type Pool ¶
func CreatePool ¶
func NewPoolFromVir ¶ added in v0.2.23
func NewPoolFromVir(pool *libvirt.StoragePool) *Pool
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 string `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 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"`
}
Click to show internal directories.
Click to hide internal directories.