Omer Frenkel has posted comments on this change. Change subject: core: minor refactoring in pool related commands ......................................................................
Patch Set 6: (2 comments) http://gerrit.ovirt.org/#/c/28864/6/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmToPoolCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmToPoolCommand.java: Line 28: Line 29: if (getParameters().getVmPoolId() != null) { Line 30: VmPool pool = getVmPoolDAO().get(getParameters().getVmPoolId()); Line 31: if (pool != null) { Line 32: if (!pool.getVdsGroupId().equals(getVm().getVdsGroupId())) { you can merge these 2 'if's Line 33: return failCanDoAction(VdcBllMessages.VM_POOL_CANNOT_ADD_VM_DIFFERENT_CLUSTER); Line 34: } Line 35: } Line 36: } http://gerrit.ovirt.org/#/c/28864/6/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmFromPoolCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmFromPoolCommand.java: Line 20: if (getVm() == null) { Line 21: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND); Line 22: } Line 23: Line 24: if (getVmPoolId() == null) { why did you change what we check? Line 25: return failCanDoAction(VdcBllMessages.VM_POOL_CANNOT_DETACH_VM_NOT_ATTACHED_TO_POOL); Line 26: } Line 27: Line 28: if (RemoveVmCommand.isVmRunning(getParameters().getVmId())) { -- To view, visit http://gerrit.ovirt.org/28864 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I34ee0c07081286b6445c732c87c105bc16ef6a66 Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org 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