fix(scheduler): auto allocation network selection is not working

This commit is contained in:
Zexi Li
2023-07-27 12:20:23 +08:00
parent ae62ee4275
commit 57751a20bf
@@ -97,10 +97,9 @@ func (p *NetworkSchedtagPredicate) IsResourceMatchInput(ctx context.Context, inp
}
func (p *NetworkSchedtagPredicate) IsResourceFitInput(ctx context.Context, u *core.Unit, c core.Candidater, res ISchedtagCandidateResource, input ISchedtagCustomer) core.PredicateFailureReason {
// network := res.(*api.CandidateNetwork)
// net := input.(*netW)
// return IsNetworkAvailable(ctx, c, u.SchedData(), net.NetworkConfig, network, p.GetNetworkTypes(net.NetType), nil)
return nil
network := res.(*api.CandidateNetwork)
net := input.(*netW)
return IsNetworkAvailable(ctx, c, u.SchedData(), net.NetworkConfig, network, p.GetNetworkTypes(net.NetType), nil)
}
func (p *NetworkSchedtagPredicate) GetNetworkTypes(specifyType string) []string {