Documentation ¶
Index ¶
- Constants
- type CPUPredicate
- type GroupPredicate
- func (p *GroupPredicate) Clone() core.FitPredicate
- func (p *GroupPredicate) Execute(u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
- func (p *GroupPredicate) Name() string
- func (p *GroupPredicate) OnSelect(u *core.Unit, c core.Candidater) bool
- func (p *GroupPredicate) OnSelectEnd(u *core.Unit, c core.Candidater, count int64)
- func (p *GroupPredicate) PreExecute(u *core.Unit, cs []core.Candidater) (bool, error)
- type HypervisorPredicate
- type IsolatedDevicePredicate
- func (f *IsolatedDevicePredicate) Clone() core.FitPredicate
- func (f *IsolatedDevicePredicate) Execute(u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
- func (f *IsolatedDevicePredicate) Name() string
- func (f *IsolatedDevicePredicate) PreExecute(u *core.Unit, cs []core.Candidater) (bool, error)
- type MemoryPredicate
- type MigratePredicate
- type NestPredicate
- type NetworkPredicate
- func (p *NetworkPredicate) Clone() core.FitPredicate
- func (p *NetworkPredicate) Execute(u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
- func (p *NetworkPredicate) Name() string
- func (p *NetworkPredicate) OnSelect(u *core.Unit, c core.Candidater) bool
- func (p *NetworkPredicate) OnSelectEnd(u *core.Unit, c core.Candidater, count int64)
- func (p *NetworkPredicate) PreExecute(u *core.Unit, cs []core.Candidater) (bool, error)
- type StatusPredicate
- type StoragePredicate
Constants ¶
const ( ExpectedStatus = "running" ExpectedHostStatus = "online" ExpectedEnableStatus = "enable" )
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 (f *CPUPredicate) Execute(u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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 (p *GroupPredicate) Execute(u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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 (f *HypervisorPredicate) Clone() core.FitPredicate
func (*HypervisorPredicate) Execute ¶
func (f *HypervisorPredicate) Execute(u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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 (f *IsolatedDevicePredicate) Clone() core.FitPredicate
func (*IsolatedDevicePredicate) Execute ¶
func (f *IsolatedDevicePredicate) Execute(u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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 (p *MemoryPredicate) Execute(u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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 (p *MigratePredicate) Execute(u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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 (p *NestPredicate) Execute(u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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 (p *NetworkPredicate) Execute(u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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 (p *StatusPredicate) Execute(u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
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 (p *StoragePredicate) Execute(u *core.Unit, c core.Candidater) (bool, []core.PredicateFailureReason, error)
func (*StoragePredicate) Name ¶
func (p *StoragePredicate) Name() string
func (*StoragePredicate) PreExecute ¶
func (p *StoragePredicate) PreExecute(u *core.Unit, cs []core.Candidater) (bool, error)