Retrofitted all the schedulers to now call the offerutils.AddHostIfNew(..) utility function which will dynamically populate the constants.Hosts and constants.PowerClasses.
This commit is contained in:
parent
841c7d5ee8
commit
b4f9a989cb
16 changed files with 37 additions and 75 deletions
schedulers
|
@ -18,7 +18,7 @@ func coLocated(tasks map[string]bool) {
|
|||
// Get the powerClass of the given hostname
|
||||
func hostToPowerClass(hostName string) string {
|
||||
for powerClass, hosts := range constants.PowerClasses {
|
||||
if ok := hosts[hostName]; ok {
|
||||
if _, ok := hosts[hostName]; ok {
|
||||
return powerClass
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue