Oved Ourfali has posted comments on this change. Change subject: core+ui: Support lowering cluster CPU level ......................................................................
Patch Set 2: (2 comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetNumberOfActiveVmsInVdsGroupByVdsGroupIdQuery.java Line 16: protected void executeQueryCommand() { Line 17: List<VM> vms = DbFacade.getInstance().getVmDao().getAllForVdsGroup(getParameters().getId()); Line 18: Line 19: // Active VMs are VMs that aren't in Down status Line 20: Integer activeVms = 0; I didn't use a primitive type, as the UI expects an Object. Line 21: for (VM vm : vms) { Line 22: if (vm.getStatus() != VMStatus.Down) { Line 23: ++activeVms; Line 24: } Line 22: if (vm.getStatus() != VMStatus.Down) { Line 23: ++activeVms; Line 24: } Line 25: } Line 26: getQueryReturnValue().setReturnValue(activeVms); Good point. Can a VM be image locked while running? If not, I should add this one as well. As for suspended - resuming it might also fail in case there is no host with the an equal or higher CPU level, so I guess we should consider it as active. What do you think? Line 27: } -- To view, visit http://gerrit.ovirt.org/19442 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I69a32299b5782e69aef8832501dc8969b6dc810c Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches