Documentation
¶
Index ¶
- func NewLibvirtService(db *gorm.DB, system systemServiceInterfaces.SystemServiceInterface, ...) libvirtServiceInterfaces.LibvirtServiceInterface
- type Service
- func (s *Service) ApplyVMStatsRetention() error
- func (s *Service) CheckPCIDevicesInUse(vm vmModels.VM) error
- func (s *Service) CheckVersion() error
- func (s *Service) ConvertVMToTemplate(ctx context.Context, rid uint, ...) (retErr error)
- func (s *Service) CreateCloudInitISO(vm vmModels.VM) error
- func (s *Service) CreateLvVm(id int, ctx context.Context) error
- func (s *Service) CreateStorageParent(rid uint, poolName string, ctx context.Context) error
- func (s *Service) CreateVM(data libvirtServiceInterfaces.CreateVMRequest, ctx context.Context) (err error)
- func (s *Service) CreateVMDirectory(rid uint) (string, error)
- func (s *Service) CreateVMDisk(rid uint, storage vmModels.Storage, ctx context.Context) error
- func (s *Service) CreateVMSnapshot(ctx context.Context, rid uint, name string, description string) (*vmModels.VMSnapshot, error)
- func (s *Service) CreateVMsFromTemplate(ctx context.Context, templateID uint, ...) error
- func (s *Service) CreateVmXML(vm vmModels.VM, vmPath string) (string, error)
- func (s *Service) DeleteVMSnapshot(ctx context.Context, rid uint, snapshotID uint) error
- func (s *Service) DeleteVMTemplate(ctx context.Context, templateID uint) error
- func (s *Service) FindAndChangeMAC(rid uint, oldMac string, newMac string) error
- func (s *Service) FindISOByUUID(uuid string, includeImg bool) (string, error)
- func (s *Service) FindJailsByMac(mac string) ([]jailModels.Jail, error)
- func (s *Service) FindVMsByMac(mac string) ([]vmModels.VM, error)
- func (s *Service) FindVmByMac(mac string) (vmModels.VM, error)
- func (s *Service) FlashCloudInitMediaToDisk(vm vmModels.VM) error
- func (s *Service) ForceRemoveVM(rid uint, cleanUpMacs bool, ctx context.Context) ([]string, error)
- func (s *Service) GeneratePinArgs(pins []vmModels.VMCPUPinning) []string
- func (s *Service) GetCloudInitISOPath(rid uint) (string, error)
- func (s *Service) GetDomainState(rid int) (libvirt.DomainState, error)
- func (s *Service) GetDomainStates() ([]libvirtServiceInterfaces.DomainState, error)
- func (s *Service) GetLvDomain(rid uint) (*libvirtServiceInterfaces.LvDomain, error)
- func (s *Service) GetNextBootOrderIndex(vmId int) (int, error)
- func (s *Service) GetQemuGuestAgentInfo(rid uint) (libvirtServiceInterfaces.QemuGuestAgentInfo, error)
- func (s *Service) GetSimpleVM(identifier int, byRID bool) (libvirtServiceInterfaces.SimpleList, error)
- func (s *Service) GetVM(id int) (vmModels.VM, error)
- func (s *Service) GetVMByRID(rid uint) (vmModels.VM, error)
- func (s *Service) GetVMConfigDirectory(rid uint) (string, error)
- func (s *Service) GetVMIDByRID(rid uint) (uint, error)
- func (s *Service) GetVMLogs(rid uint) (string, error)
- func (s *Service) GetVMTemplate(templateID uint) (*vmModels.VMTemplate, error)
- func (s *Service) GetVMTemplatesSimple() ([]libvirtServiceInterfaces.SimpleTemplateList, error)
- func (s *Service) GetVMUsage(rid int, step db.GFSStep) ([]vmModels.VMStats, error)
- func (s *Service) GetVMXML(rid uint) (string, error)
- func (s *Service) IsDomainInactive(rid uint) (bool, error)
- func (s *Service) IsDomainShutOff(rid uint) (bool, error)
- func (s *Service) IsDomainShutOffByID(id uint) (bool, error)
- func (s *Service) IsVirtualizationEnabled() bool
- func (s *Service) ListVMSnapshots(rid uint) ([]vmModels.VMSnapshot, error)
- func (s *Service) ListVMs() ([]vmModels.VM, error)
- func (s *Service) LvVMAction(vm vmModels.VM, action string) error
- func (s *Service) ModifyBootOrder(rid uint, startAtBoot bool, bootOrder int) error
- func (s *Service) ModifyCPU(rid uint, req libvirtServiceInterfaces.ModifyCPURequest) error
- func (s *Service) ModifyClock(rid uint, timeOffset string) error
- func (s *Service) ModifyCloudInitData(rid uint, data string, metadata string, networkConfig string) error
- func (s *Service) ModifyIgnoreUMSRs(rid uint, ignore bool) error
- func (s *Service) ModifyPassthrough(rid uint, pciDevices []int) error
- func (s *Service) ModifyQemuGuestAgent(rid uint, enabled bool) error
- func (s *Service) ModifyRAM(rid uint, ram int) error
- func (s *Service) ModifySerial(rid uint, enabled bool) error
- func (s *Service) ModifyShutdownWaitTime(rid uint, waitTime int) error
- func (s *Service) ModifyTPMEmulation(rid uint, enabled bool) error
- func (s *Service) ModifyVNC(rid uint, req libvirtServiceInterfaces.ModifyVNCRequest) error
- func (s *Service) ModifyWakeOnLan(rid uint, enabled bool) error
- func (s *Service) NetworkAttach(req libvirtServiceInterfaces.NetworkAttachRequest) error
- func (s *Service) NetworkDetach(rid uint, networkId uint) error
- func (s *Service) NetworkUpdate(req libvirtServiceInterfaces.NetworkUpdateRequest) error
- func (s *Service) PerformAction(rid uint, action string) error
- func (s *Service) PreflightConvertVMToTemplate(ctx context.Context, rid uint, ...) error
- func (s *Service) PreflightCreateVMsFromTemplate(ctx context.Context, templateID uint, ...) error
- func (s *Service) PruneOrphanedVMStats() error
- func (s *Service) RemoveLvVm(rid uint) error
- func (s *Service) RemoveQGASocket(vm vmModels.VM) error
- func (s *Service) RemoveStorageXML(rid uint, storage vmModels.Storage) error
- func (s *Service) RemoveVM(rid uint, cleanUpMacs bool, deleteRawDisks bool, deleteVolumes bool, ...) error
- func (s *Service) ResetUEFIVars(rid uint) error
- func (s *Service) RetireVMLocalMetadata(rid uint, cleanUpMacs bool) error
- func (s *Service) RollbackVMSnapshot(ctx context.Context, rid uint, snapshotID uint, destroyMoreRecent bool) error
- func (s *Service) SetActionDate(vm vmModels.VM, action string) error
- func (s *Service) SetLeftPanelRefreshEmitter(emitter func(reason string))
- func (s *Service) SimpleListVM() ([]libvirtServiceInterfaces.SimpleList, error)
- func (s *Service) StartLifecycleWatcher(ctx context.Context)
- func (s *Service) StartTPM() error
- func (s *Service) StopTPM(rid uint) error
- func (s *Service) StorageAttach(req libvirtServiceInterfaces.StorageAttachRequest, ctx context.Context) error
- func (s *Service) StorageDetach(req libvirtServiceInterfaces.StorageDetachRequest) error
- func (s *Service) StorageImport(req libvirtServiceInterfaces.StorageAttachRequest, vm vmModels.VM, ...) error
- func (s *Service) StorageNew(req libvirtServiceInterfaces.StorageAttachRequest, vm vmModels.VM, ...) error
- func (s *Service) StorageUpdate(req libvirtServiceInterfaces.StorageUpdateRequest, ctx context.Context) error
- func (s *Service) StoreVMUsage() error
- func (s *Service) SyncVMDisks(rid uint) error
- func (s *Service) UpdateDescription(rid uint, description string) error
- func (s *Service) UpdateName(rid uint, name string) error
- func (s *Service) ValidateBootOrderIndex(vmId int, bootOrder int) (bool, error)
- func (s *Service) ValidateCPUPins(rid uint, pins []libvirtServiceInterfaces.CPUPinning, hostLogicalPerSocket int) error
- func (s *Service) WriteVMJson(rid uint) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLibvirtService ¶
func NewLibvirtService(db *gorm.DB, system systemServiceInterfaces.SystemServiceInterface, gzfs *gzfs.Client) libvirtServiceInterfaces.LibvirtServiceInterface
Types ¶
type Service ¶
type Service struct {
DB *gorm.DB
System systemServiceInterfaces.SystemServiceInterface
Conn *libvirt.Libvirt
GZFS *gzfs.Client
// contains filtered or unexported fields
}
func (*Service) ApplyVMStatsRetention ¶ added in v0.1.0
func (*Service) CheckVersion ¶
func (*Service) ConvertVMToTemplate ¶ added in v0.2.0
func (s *Service) ConvertVMToTemplate( ctx context.Context, rid uint, req libvirtServiceInterfaces.ConvertToTemplateRequest, ) (retErr error)
func (*Service) CreateCloudInitISO ¶ added in v0.1.0
func (*Service) CreateStorageParent ¶ added in v0.1.0
func (*Service) CreateVM ¶
func (s *Service) CreateVM(data libvirtServiceInterfaces.CreateVMRequest, ctx context.Context) (err error)
func (*Service) CreateVMDirectory ¶ added in v0.1.0
func (*Service) CreateVMDisk ¶ added in v0.1.0
func (*Service) CreateVMSnapshot ¶ added in v0.1.0
func (*Service) CreateVMsFromTemplate ¶ added in v0.2.0
func (s *Service) CreateVMsFromTemplate(ctx context.Context, templateID uint, req libvirtServiceInterfaces.CreateFromTemplateRequest) error
func (*Service) CreateVmXML ¶
func (*Service) DeleteVMSnapshot ¶ added in v0.1.0
func (*Service) DeleteVMTemplate ¶ added in v0.2.0
func (*Service) FindAndChangeMAC ¶
func (*Service) FindISOByUUID ¶
func (*Service) FindJailsByMac ¶ added in v0.2.2
func (s *Service) FindJailsByMac(mac string) ([]jailModels.Jail, error)
func (*Service) FindVMsByMac ¶ added in v0.2.2
func (*Service) FlashCloudInitMediaToDisk ¶ added in v0.1.0
func (*Service) ForceRemoveVM ¶ added in v0.1.0
func (*Service) GeneratePinArgs ¶ added in v0.1.0
func (s *Service) GeneratePinArgs(pins []vmModels.VMCPUPinning) []string
func (*Service) GetCloudInitISOPath ¶ added in v0.1.0
func (*Service) GetDomainState ¶ added in v0.1.0
func (s *Service) GetDomainState(rid int) (libvirt.DomainState, error)
func (*Service) GetDomainStates ¶ added in v0.1.0
func (s *Service) GetDomainStates() ([]libvirtServiceInterfaces.DomainState, error)
func (*Service) GetLvDomain ¶
func (s *Service) GetLvDomain(rid uint) (*libvirtServiceInterfaces.LvDomain, error)
func (*Service) GetNextBootOrderIndex ¶ added in v0.1.0
func (*Service) GetQemuGuestAgentInfo ¶ added in v0.1.0
func (s *Service) GetQemuGuestAgentInfo(rid uint) (libvirtServiceInterfaces.QemuGuestAgentInfo, error)
func (*Service) GetSimpleVM ¶ added in v0.1.0
func (s *Service) GetSimpleVM(identifier int, byRID bool) (libvirtServiceInterfaces.SimpleList, error)
func (*Service) GetVMByRID ¶ added in v0.1.0
func (*Service) GetVMConfigDirectory ¶ added in v0.1.0
func (*Service) GetVMIDByRID ¶ added in v0.2.0
func (*Service) GetVMTemplate ¶ added in v0.2.0
func (s *Service) GetVMTemplate(templateID uint) (*vmModels.VMTemplate, error)
func (*Service) GetVMTemplatesSimple ¶ added in v0.2.0
func (s *Service) GetVMTemplatesSimple() ([]libvirtServiceInterfaces.SimpleTemplateList, error)
func (*Service) GetVMUsage ¶
func (*Service) IsDomainShutOffByID ¶ added in v0.1.0
func (*Service) IsVirtualizationEnabled ¶ added in v0.1.0
func (*Service) ListVMSnapshots ¶ added in v0.1.0
func (s *Service) ListVMSnapshots(rid uint) ([]vmModels.VMSnapshot, error)
func (*Service) ModifyBootOrder ¶
func (*Service) ModifyCPU ¶
func (s *Service) ModifyCPU(rid uint, req libvirtServiceInterfaces.ModifyCPURequest) error
func (*Service) ModifyClock ¶ added in v0.1.0
func (*Service) ModifyCloudInitData ¶ added in v0.1.0
func (*Service) ModifyIgnoreUMSRs ¶ added in v0.1.0
func (*Service) ModifyPassthrough ¶
func (*Service) ModifyQemuGuestAgent ¶ added in v0.1.0
func (*Service) ModifySerial ¶ added in v0.1.0
func (*Service) ModifyShutdownWaitTime ¶ added in v0.1.0
func (*Service) ModifyTPMEmulation ¶ added in v0.1.0
func (*Service) ModifyVNC ¶
func (s *Service) ModifyVNC(rid uint, req libvirtServiceInterfaces.ModifyVNCRequest) error
func (*Service) NetworkAttach ¶
func (s *Service) NetworkAttach(req libvirtServiceInterfaces.NetworkAttachRequest) error
func (*Service) NetworkUpdate ¶ added in v0.1.0
func (s *Service) NetworkUpdate(req libvirtServiceInterfaces.NetworkUpdateRequest) error
func (*Service) PreflightConvertVMToTemplate ¶ added in v0.2.0
func (s *Service) PreflightConvertVMToTemplate( ctx context.Context, rid uint, req libvirtServiceInterfaces.ConvertToTemplateRequest, ) error
func (*Service) PreflightCreateVMsFromTemplate ¶ added in v0.2.0
func (s *Service) PreflightCreateVMsFromTemplate(ctx context.Context, templateID uint, req libvirtServiceInterfaces.CreateFromTemplateRequest) error
func (*Service) PruneOrphanedVMStats ¶
func (*Service) RemoveLvVm ¶
func (*Service) RemoveQGASocket ¶ added in v0.1.0
func (*Service) RemoveStorageXML ¶ added in v0.1.0
func (*Service) ResetUEFIVars ¶ added in v0.1.0
func (*Service) RetireVMLocalMetadata ¶ added in v0.1.0
func (*Service) RollbackVMSnapshot ¶ added in v0.1.0
func (*Service) SetActionDate ¶
func (*Service) SetLeftPanelRefreshEmitter ¶ added in v0.1.0
func (*Service) SimpleListVM ¶
func (s *Service) SimpleListVM() ([]libvirtServiceInterfaces.SimpleList, error)
func (*Service) StartLifecycleWatcher ¶ added in v0.1.0
func (*Service) StorageAttach ¶
func (s *Service) StorageAttach(req libvirtServiceInterfaces.StorageAttachRequest, ctx context.Context) error
func (*Service) StorageDetach ¶
func (s *Service) StorageDetach(req libvirtServiceInterfaces.StorageDetachRequest) error
func (*Service) StorageImport ¶ added in v0.1.0
func (s *Service) StorageImport(req libvirtServiceInterfaces.StorageAttachRequest, vm vmModels.VM, ctx context.Context) error
func (*Service) StorageNew ¶ added in v0.1.0
func (s *Service) StorageNew(req libvirtServiceInterfaces.StorageAttachRequest, vm vmModels.VM, ctx context.Context) error
func (*Service) StorageUpdate ¶ added in v0.1.0
func (s *Service) StorageUpdate(req libvirtServiceInterfaces.StorageUpdateRequest, ctx context.Context) error
func (*Service) StoreVMUsage ¶
func (*Service) SyncVMDisks ¶ added in v0.1.0
func (*Service) UpdateDescription ¶
func (*Service) UpdateName ¶ added in v0.2.1
func (*Service) ValidateBootOrderIndex ¶ added in v0.1.0
func (*Service) ValidateCPUPins ¶ added in v0.1.0
func (s *Service) ValidateCPUPins(rid uint, pins []libvirtServiceInterfaces.CPUPinning, hostLogicalPerSocket int) error
func (*Service) WriteVMJson ¶ added in v0.1.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.