scheduler

package
v0.3.9-5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 3 Imported by: 18

Documentation

Index

Constants

View Source
const (
	SERVICE_TYPE    = apis.SERVICE_TYPE_SCHEDULER
	SERVICE_VERSION = ""
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CandidateDisk

type CandidateDisk struct {
	Index      int      `json:"index"`
	StorageIds []string `json:"storage_ids"`
}

type CandidateDiskV2

type CandidateDiskV2 struct {
	Index    int                 `json:"index"`
	Storages []*CandidateStorage `json:"storages"`
}

type CandidateNet

type CandidateNet struct {
	Index      int      `json:"index"`
	NetworkIds []string `json:"network_ids"`
}

type CandidateResource

type CandidateResource struct {
	SessionId string           `json:"session_id"`
	HostId    string           `json:"host_id"`
	Name      string           `json:"name"`
	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 CandidateStorage struct {
	Id           string
	Name         string
	FreeCapacity int64
}

type ForGuest

type ForGuest struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type GroupRelation

type GroupRelation struct {
	GroupId  string `json:"group_id"`
	Strategy string `json:"strategy"`
	Scope    string `json:"scope"`
}

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"`

	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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL