Documentation ¶
Index ¶
- Constants
- func NodesFreeCpuEnough(nodeCount, vcpuCount int, cpuNumaFree []*SFreeNumaCpuMem) bool
- func NodesFreeMemSizeEnough(nodeCount, memSize int, cpuNumaFree []*SFreeNumaCpuMem) bool
- type CandidateDisk
- type CandidateDiskV2
- type CandidateNet
- type CandidateResource
- type CandidateStorage
- type ForGuest
- type GroupRelation
- type SCpuNumaPin
- type SCpuPin
- type SFreeNumaCpuMem
- type ScheduleBaseConfig
- type ScheduleInput
- type ScheduleOutput
- type ServerConfig
- type SortedFreeNumaCpuMam
Constants ¶
View Source
const ( SERVICE_TYPE = apis.SERVICE_TYPE_SCHEDULER SERVICE_VERSION = "" )
Variables ¶
This section is empty.
Functions ¶
func NodesFreeCpuEnough ¶
func NodesFreeCpuEnough(nodeCount, vcpuCount int, cpuNumaFree []*SFreeNumaCpuMem) bool
func NodesFreeMemSizeEnough ¶
func NodesFreeMemSizeEnough(nodeCount, memSize int, cpuNumaFree []*SFreeNumaCpuMem) bool
Types ¶
type CandidateDisk ¶
type CandidateDiskV2 ¶
type CandidateDiskV2 struct { Index int `json:"index"` Storages []*CandidateStorage `json:"storages"` }
type CandidateNet ¶
type CandidateResource ¶
type CandidateResource struct { SessionId string `json:"session_id"` HostId string `json:"host_id"` Name string `json:"name"` CpuNumaPin []SCpuNumaPin `json:"cpu_numa_pin"` Disks []*CandidateDisk `json:"disks"` Nets []*CandidateNet `json:"nets"` // used by backup schedule BackupCandidate *CandidateResource `json:"backup_candidate"` // Error means no candidate found, include reasons Error string `json:"error"` }
type CandidateStorage ¶
type GroupRelation ¶
type SCpuNumaPin ¶
type SFreeNumaCpuMem ¶
type ScheduleBaseConfig ¶
type ScheduleBaseConfig struct { BestEffort bool `json:"best_effort"` SuggestionLimit int64 `json:"suggestion_limit"` SuggestionAll bool `json:"suggestion_all"` IgnoreFilters []string `json:"ignore_filters"` SessionId string `json:"session_id"` // usedby test api RecordLog bool `json:"record_to_history"` Details bool `json:"details"` }
type ScheduleInput ¶
type ScheduleInput struct { apis.Meta ScheduleBaseConfig ServerConfig // HostId used by migrate HostId string `json:"host_id"` LiveMigrate bool `json:"live_migrate"` SkipCpuCheck *bool `json:"skip_cpu_check"` CpuDesc string `json:"cpu_desc"` CpuMicrocode string `json:"cpu_microcode"` CpuMode string `json:"cpu_mode"` OsArch string `json:"os_arch"` ResetCpuNumaPin bool `json:"reset_cpu_numa_pin"` // For Migrate CpuNumaPin []SCpuNumaPin `json:"cpu_numa_pin"` HostMemPageSizeKB int `json:"host_mem_page_size"` SkipKernelCheck *bool `json:"skip_kernel_check"` TargetHostKernel string `json:"target_host_kernel"` // In the migrate and create backup cases // we don't need reallocate network ReuseNetwork bool `json:"reuse_network"` // Change config ChangeConfig bool // guest who change config has isolated device HasIsolatedDevice bool PendingUsages []jsonutils.JSONObject }
ScheduleInput used by scheduler sync-schedule/test/forecast api
func (ScheduleInput) ToConditionInput ¶
func (input ScheduleInput) ToConditionInput() *jsonutils.JSONDict
type ScheduleOutput ¶
type ScheduleOutput struct { apis.Meta Candidates []*CandidateResource `json:"candidates"` }
type ServerConfig ¶
type ServerConfig struct { *compute.ServerConfigs Memory int `json:"vmem_size"` Ncpu int `json:"vcpu_count"` Name string `json:"name"` GuestStatus string `json:"guest_status"` Cdrom string `json:"cdrom"` // owner project id Project string `json:"project_id"` // owner domain id Domain string `json:"domain_id"` // Deprecated Metadata map[string]string `json:"__meta__"` ForGuests []*ForGuest `json:"for_guests"` GroupRelations []*GroupRelation `json:"group_releations"` Groups interface{} `json:"groups"` Id string `json:"id"` InstanceSnapshotId string `json:"instance_snapshot_id"` InstanceBackupId string `json:"instance_backup_id"` }
type SortedFreeNumaCpuMam ¶
type SortedFreeNumaCpuMam []*SFreeNumaCpuMem
func (SortedFreeNumaCpuMam) Len ¶
func (pq SortedFreeNumaCpuMam) Len() int
func (SortedFreeNumaCpuMam) Less ¶
func (pq SortedFreeNumaCpuMam) Less(i, j int) bool
func (SortedFreeNumaCpuMam) Swap ¶
func (pq SortedFreeNumaCpuMam) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.