Developing lightweight computation at the DSG edge

Commit 4313705c authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[monitor-assign] Enforce maxMons for policy #2


Signed-off-by: Roger Pueyo Centelles's avatarRoger Pueyo Centelles <rpueyo@ac.upc.edu>
parent 140e8377
......@@ -536,7 +536,7 @@ func reassignDevs() {
var unassignedDevices []cnml.DeviceIpv4sGraphserver
for leastMons < maxMons && len(unassignedDevices) == 0 {
for leastMons <= maxMons && len(unassignedDevices) == 0 {
for _, v := range cnmlDevices {
if !isDeviceInAssignationSlice(v.ID, globalAssign) || (!isDeviceInAssignationSlice(v.ID, localAssign) && len(globalAssign[posDeviceInAssignationSlice(v.ID, globalAssign)].MonitorID) < leastMons) {
unassignedDevices = append(unassignedDevices, v)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment