guest

package
v2.2.6+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExpectedStatus       = "running"
	ExpectedHostStatus   = "online"
	ExpectedEnableStatus = "enable"
)
View Source
const (
	CONTAINER_ALLOWED_TAG = "container"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUPredicate

type CPUPredicate struct {
	predicates.BasePredicate
}

CPUPredicate check the current resources of the CPU is available, it returns the maximum available capacity.

func (*CPUPredicate) Clone

func (f *CPUPredicate) Clone() core.FitPredicate

func (*CPUPredicate) Execute

func (*CPUPredicate) Name

func (f *CPUPredicate) Name() string

func (*CPUPredicate) PreExecute

func (f *CPUPredicate) PreExecute(u *core.Unit, cs []core.Candidater) (bool, error)

type GroupPredicate

type GroupPredicate struct {
	predicates.BasePredicate

	ExcludeGroups []string
	RequireGroups []string
	AvoidGroups   []string
	PreferGroups  []string
}

GroupPredicate filter the packet based on the label information, the same group of guests should avoid schedule on same host.

func (*GroupPredicate) Clone

func (p *GroupPredicate) Clone() core.FitPredicate

func (*GroupPredicate) Execute

func (*GroupPredicate) Name

func (p *GroupPredicate) Name() string

func (*GroupPredicate) OnSelect

func (p *GroupPredicate) OnSelect(u *core.Unit, c core.Candidater) bool

func (*GroupPredicate) OnSelectEnd

func (p *GroupPredicate) OnSelectEnd(u *core.Unit, c core.Candidater, count int64)

func (*GroupPredicate) PreExecute

func (p *GroupPredicate) PreExecute(u *core.Unit, cs []core.Candidater) (bool, error)

type HypervisorPredicate

type HypervisorPredicate struct {
	predicates.BasePredicate
}

HypervisorPredicate is to select candidates match guest hyperviosr runtime

func (*HypervisorPredicate) Clone

func (*HypervisorPredicate) Execute

func (*HypervisorPredicate) Name

func (f *HypervisorPredicate) Name() string

type IsolatedDevicePredicate

type IsolatedDevicePredicate struct {
	predicates.BasePredicate
}

IsolatedDevicePredicate check mode, and number of scheduled device configurations and current resources.

func (*IsolatedDevicePredicate) Clone

func (*IsolatedDevicePredicate) Execute

func (*IsolatedDevicePredicate) Name

func (f *IsolatedDevicePredicate) Name() string

func (*IsolatedDevicePredicate) PreExecute

func (f *IsolatedDevicePredicate) PreExecute(u *core.Unit, cs []core.Candidater) (bool, error)

type MemoryPredicate

type MemoryPredicate struct {
	predicates.BasePredicate
}

MemoryPredicate filter current resources free memory capacity is meet, if it is satisfied to return the size of the memory that can carry the scheduling request.

func (*MemoryPredicate) Clone

func (p *MemoryPredicate) Clone() core.FitPredicate

func (*MemoryPredicate) Execute

func (*MemoryPredicate) Name

func (p *MemoryPredicate) Name() string

func (*MemoryPredicate) PreExecute

func (p *MemoryPredicate) PreExecute(u *core.Unit, cs []core.Candidater) (bool, error)

type MigratePredicate

type MigratePredicate struct {
	predicates.BasePredicate
}

MigratePredicate filters whether the current candidate can be migrated.

func (*MigratePredicate) Clone

func (p *MigratePredicate) Clone() core.FitPredicate

func (*MigratePredicate) Execute

func (*MigratePredicate) Name

func (p *MigratePredicate) Name() string

func (*MigratePredicate) PreExecute

func (p *MigratePredicate) PreExecute(u *core.Unit, cs []core.Candidater) (bool, error)

type NestPredicate

type NestPredicate struct {
	predicates.BasePredicate
}

NestPredicate will filter whether the current host is turned on KVM, if the scheduling specified settings are inconsistent, then the host will be filtered out.

func (*NestPredicate) Clone

func (p *NestPredicate) Clone() core.FitPredicate

func (*NestPredicate) Execute

func (*NestPredicate) Name

func (p *NestPredicate) Name() string

type NetworkPredicate

type NetworkPredicate struct {
	predicates.BasePredicate
	SelectedNetworks sync.Map
}

NetworkPredicate will filter the current network information with the specified scheduling information to match, if not specified will randomly match the available network resources.

func (*NetworkPredicate) Clone

func (p *NetworkPredicate) Clone() core.FitPredicate

func (*NetworkPredicate) Execute

func (*NetworkPredicate) Name

func (p *NetworkPredicate) Name() string

func (*NetworkPredicate) OnSelect

func (p *NetworkPredicate) OnSelect(u *core.Unit, c core.Candidater) bool

func (*NetworkPredicate) OnSelectEnd

func (p *NetworkPredicate) OnSelectEnd(u *core.Unit, c core.Candidater, count int64)

func (*NetworkPredicate) PreExecute

func (p *NetworkPredicate) PreExecute(u *core.Unit, cs []core.Candidater) (bool, error)

type StatusPredicate

type StatusPredicate struct {
	predicates.BasePredicate
}

StatusPredicate is to filter the current state of host is available, not available host's capacity will be set to 0 and filtered out.

func (*StatusPredicate) Clone

func (p *StatusPredicate) Clone() core.FitPredicate

func (*StatusPredicate) Execute

func (*StatusPredicate) Name

func (p *StatusPredicate) Name() string

type StoragePredicate

type StoragePredicate struct {
	predicates.BasePredicate
}

StoragePredicate used to filter whether the storage capacity of the current candidate matches the type of the disk. If not matched, the storage capacity will be set to 0.

func (*StoragePredicate) Clone

func (p *StoragePredicate) Clone() core.FitPredicate

func (*StoragePredicate) Execute

func (*StoragePredicate) Name

func (p *StoragePredicate) Name() string

func (*StoragePredicate) PreExecute

func (p *StoragePredicate) PreExecute(u *core.Unit, cs []core.Candidater) (bool, error)

Jump to

Keyboard shortcuts

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