Documentation ¶
Index ¶
- type HistoryRecord
- type LCMState
- type Monitoring
- type Pool
- type PoolMonitoring
- type SchedAction
- type State
- type Template
- func (t *Template) Add(key keys.Template, value interface{})
- func (t *Template) AddB64Ctx(key keys.ContextB64, value interface{}) error
- func (t *Template) AddCtx(key keys.Context, value interface{}) error
- func (t *Template) AddDisk() *shared.Disk
- func (t *Template) AddFeature(key keys.Feature, value string) error
- func (t *Template) AddIOGraphic(key keys.IOGraphics, value interface{}) error
- func (t *Template) AddIOInput(key keys.IOInput, value string) error
- func (t *Template) AddNIC() *shared.NIC
- func (t *Template) AddOS(key keys.OS, value string) error
- func (t *Template) AddSchedAction() *SchedAction
- func (t *Template) CPU(cpu float64) *Template
- func (t *Template) CPUModel(value string) *Template
- func (t *Template) Get(key keys.Template) (string, error)
- func (t *Template) GetCPU() (float64, error)
- func (t *Template) GetCPUModel(key keys.CPUModel) (string, error)
- func (t *Template) GetCtx(key keys.Context) (string, error)
- func (t *Template) GetDisks() []shared.Disk
- func (t *Template) GetFeature(key keys.Feature) (string, error)
- func (n *Template) GetI(key keys.Template) (int, error)
- func (t *Template) GetIOGraphic(key keys.IOGraphics) (string, error)
- func (t *Template) GetIOInput(key keys.IOInput) (string, error)
- func (t *Template) GetMemory() (int, error)
- func (t *Template) GetNICs() []shared.NIC
- func (t *Template) GetOS(key keys.OS) (string, error)
- func (t *Template) GetPlacement(key keys.Placement) (string, error)
- func (t *Template) GetShowback(key keys.Showback) (string, error)
- func (t *Template) GetVCPU() (int, error)
- func (t *Template) Memory(memory int) *Template
- func (t *Template) Placement(key keys.Placement, value interface{}) *Template
- func (t *Template) Showback(key keys.Showback, value interface{}) *Template
- func (t *Template) VCPU(vcpu int) *Template
- type UserTemplate
- type VM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HistoryRecord ¶
type HistoryRecord struct { OID int `xml:"OID"` SEQ int `xml:"SEQ"` Hostname string `xml:"HOSTNAME"` HID int `xml:"HID"` CID int `xml:"CID"` STime int `xml:"STIME"` ETime int `xml:"ETIME"` VMMad string `xml:"VM_MAD"` TMMad string `xml:"TM_MAD"` DSID int `xml:"DS_ID"` PSTime int `xml:"PSTIME"` PETime int `xml:"PETIME"` RSTime int `xml:"RSTIME"` RETime int `xml:"RETIME"` ESTime int `xml:"ESTIME"` EETime int `xml:"EETIME"` Action int `xml:"ACTION"` UID int `xml:"UID"` GID int `xml:"GID"` RequestID string `xml:"REQUEST_ID"` }
History records
type LCMState ¶
type LCMState int
LCMState is the life-cycle manager state of the virtual machine. It is used only when the VM's state is active, otherwise it's LcmInit
const ( // LcmInit lcm state LcmInit LCMState = 0 // Prolog lcm state Prolog LCMState = 1 // Boot lcm state Boot LCMState = 2 // Running lcm state Running LCMState = 3 // Migrate lcm state Migrate LCMState = 4 // SaveStop lcm state SaveStop LCMState = 5 // SaveSuspend lcm state SaveSuspend LCMState = 6 // SaveMigrate lcm state SaveMigrate LCMState = 7 // PrologMigrate lcm state PrologMigrate LCMState = 8 // PrologResume lcm state PrologResume LCMState = 9 // EpilogStop lcm state EpilogStop LCMState = 10 // Epilog lcm state Epilog LCMState = 11 // Shutdown lcm state Shutdown LCMState = 12 // CleanupResubmit lcm state CleanupResubmit LCMState = 15 // Unknown lcm state Unknown LCMState = 16 // Hotplug lcm state Hotplug LCMState = 17 // ShutdownPoweroff lcm state ShutdownPoweroff LCMState = 18 // BootUnknown lcm state BootUnknown LCMState = 19 // BootPoweroff lcm state BootPoweroff LCMState = 20 // BootSuspended lcm state BootSuspended LCMState = 21 // BootStopped lcm state BootStopped LCMState = 22 // CleanupDelete lcm state CleanupDelete LCMState = 23 // HotplugSnapshot lcm state HotplugSnapshot LCMState = 24 // HotplugNic lcm state HotplugNic LCMState = 25 // HotplugSaveas lcm state HotplugSaveas LCMState = 26 // HotplugSaveasPoweroff lcm state HotplugSaveasPoweroff LCMState = 27 // HotplugSaveasSuspended lcm state HotplugSaveasSuspended LCMState = 28 // ShutdownUndeploy lcm state ShutdownUndeploy LCMState = 29 // EpilogUndeploy lcm state EpilogUndeploy LCMState = 30 // PrologUndeploy lcm state PrologUndeploy LCMState = 31 // BootUndeploy lcm state BootUndeploy LCMState = 32 // HotplugPrologPoweroff lcm state HotplugPrologPoweroff LCMState = 33 // HotplugEpilogPoweroff lcm state HotplugEpilogPoweroff LCMState = 34 // BootMigrate lcm state BootMigrate LCMState = 35 // BootFailure lcm state BootFailure LCMState = 36 // BootMigrateFailure lcm state BootMigrateFailure LCMState = 37 // PrologMigrateFailure lcm state PrologMigrateFailure LCMState = 38 // PrologFailure lcm state PrologFailure LCMState = 39 // EpilogFailure lcm state EpilogFailure LCMState = 40 // EpilogStopFailure lcm state EpilogStopFailure LCMState = 41 // EpilogUndeployFailure lcm state EpilogUndeployFailure LCMState = 42 // PrologMigratePoweroff lcm state PrologMigratePoweroff LCMState = 43 // PrologMigratePoweroffFailure lcm state PrologMigratePoweroffFailure LCMState = 44 // PrologMigrateSuspend lcm state PrologMigrateSuspend LCMState = 45 // PrologMigrateSuspendFailure lcm state PrologMigrateSuspendFailure LCMState = 46 // BootUndeployFailure lcm state BootUndeployFailure LCMState = 47 // BootStoppedFailure lcm state BootStoppedFailure LCMState = 48 // PrologResumeFailure lcm state PrologResumeFailure LCMState = 49 // PrologUndeployFailure lcm state PrologUndeployFailure LCMState = 50 // DiskSnapshotPoweroff lcm state DiskSnapshotPoweroff LCMState = 51 // DiskSnapshotRevertPoweroff lcm state DiskSnapshotRevertPoweroff LCMState = 52 // DiskSnapshotDeletePoweroff lcm state DiskSnapshotDeletePoweroff LCMState = 53 // DiskSnapshotSuspended lcm state DiskSnapshotSuspended LCMState = 54 // DiskSnapshotRevertSuspended lcm state DiskSnapshotRevertSuspended LCMState = 55 // DiskSnapshotDeleteSuspended lcm state DiskSnapshotDeleteSuspended LCMState = 56 // DiskSnapshot lcm state DiskSnapshot LCMState = 57 // DiskSnapshotDelete lcm state DiskSnapshotDelete LCMState = 59 // PrologMigrateUnknown lcm state PrologMigrateUnknown LCMState = 60 // PrologMigrateUnknownFailure lcm state PrologMigrateUnknownFailure LCMState = 61 // DiskResize lcm state DiskResize LCMState = 62 // DiskResizePoweroff lcm state DiskResizePoweroff LCMState = 63 // DiskResizeUndeployed lcm state DiskResizeUndeployed LCMState = 64 // HotplugNicPoweroff lcm state HotplugNicPoweroff = 65 // HotplugResize lcm state HotplugResize = 66 // HotplugSaveasUndeployed lcm state HotplugSaveasUndeployed = 67 // HotplugSaveasStopped lcm state HotplugSaveasStopped = 68 )
type Monitoring ¶
type Monitoring struct { XMLName xml.Name `xml:"MONITORING_DATA"` Records []dyn.Template `xml:"MONITORING"` }
Monitoring contains the monitoring records of a VM
type PoolMonitoring ¶
type PoolMonitoring struct { XMLName xml.Name `xml:"MONITORING_DATA"` VMs []dyn.Template `xml:"MONITORING"` }
PoolMonitoring contains the monitoring records of the VMs
type SchedAction ¶
SchedAction is a scheduled action on VM
func (*SchedAction) Add ¶
func (t *SchedAction) Add(key keys.SchedAction, value interface{})
Add adds a SchedAction key, value pair
func (*SchedAction) Get ¶
func (t *SchedAction) Get(key keys.SchedAction) (string, error)
Get retrieve a SchedAction key
type State ¶
type State int
State is the state of the Virtual Machine
const ( // Init state Init State = 0 // Pending state Pending State = 1 // Hold state Hold State = 2 // Active state Active State = 3 // Stopped state Stopped State = 4 // Suspended state Suspended State = 5 // Done state Done State = 6 // Poweroff state Poweroff State = 8 // Undeployed state Undeployed State = 9 // Cloning state Cloning State = 10 // CloningFailure state CloningFailure State = 11 )
type Template ¶
Template is a structure allowing to parse VM templates. It's defined in a semi-static way to guide the user among the bunch of values
func (*Template) AddB64Ctx ¶
func (t *Template) AddB64Ctx(key keys.ContextB64, value interface{}) error
Add adds a context key, value pair. It will convert value to base64
func (*Template) AddIOGraphic ¶
func (t *Template) AddIOGraphic(key keys.IOGraphics, value interface{}) error
func (*Template) AddSchedAction ¶
func (t *Template) AddSchedAction() *SchedAction
AddSchedAction returns a structure disk entity to build
func (*Template) GetCPUModel ¶
GetCPUModel get the model of the CPU
func (*Template) GetIOGraphic ¶
func (t *Template) GetIOGraphic(key keys.IOGraphics) (string, error)
type UserTemplate ¶
UserTemplate contains common and custom attributes
func (*UserTemplate) Get ¶
func (d *UserTemplate) Get(key keys.UserTemplate) (string, error)
Get allows to get a pair by key
type VM ¶
type VM struct { XMLName xml.Name `xml:"VM"` ID int `xml:"ID,omitempty"` UID int `xml:"UID,omitempty"` GID int `xml:"GID,omitempty"` UName string `xml:"UNAME,omitempty"` GName string `xml:"GNAME,omitempty"` Name string `xml:"NAME,omitempty"` Permissions *shared.Permissions `xml:"PERMISSIONS,omitempty"` LastPoll int `xml:"LAST_POLL,omitempty"` StateRaw int `xml:"STATE,omitempty"` LCMStateRaw int `xml:"LCM_STATE,omitempty"` PrevStateRaw int `xml:"PREV_STATE,omitempty"` PrevLCMStateRaw int `xml:"PREV_LCM_STATE,omitempty"` ReschedValue int `xml:"RESCHED,omitempty"` STime int `xml:"STIME,omitempty"` ETime int `xml:"ETIME,omitempty"` DeployID string `xml:"DEPLOY_ID,omitempty"` MonitoringInfos dyn.Template `xml:"MONITORING,omitempty"` Template Template `xml:"TEMPLATE,omitempty"` UserTemplate UserTemplate `xml:"USER_TEMPLATE,omitempty"` HistoryRecords []HistoryRecord `xml:"HISTORY_RECORDS>HISTORY,omitempty"` Snapshots []shared.DiskSnapshot `xml:"SNAPSHOTS,omitempty"` // Not filled with NewUserPool call LockInfos *shared.Lock `xml:"LOCK"` }
VM represents an OpenNebula Virtual Machine
Directories ¶
Path | Synopsis |
---|---|
-------------------------------------------------------------------------- Copyright 2002-2023, OpenNebula Project, OpenNebula Systems
|
-------------------------------------------------------------------------- Copyright 2002-2023, OpenNebula Project, OpenNebula Systems |