Arik Hadas has posted comments on this change. Change subject: core: refactor ProcessDownVmCommand ......................................................................
Patch Set 12: (2 comments) http://gerrit.ovirt.org/#/c/28146/12/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ProcessDownVmCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ProcessDownVmCommand.java: Line 49: } Line 50: Line 51: @Override Line 52: protected void executeCommand() { Line 53: VmPoolMap map = getVmPoolDAO().getVmPoolMapByVmGuid(getVmId()); > i think we dont need the map, we can get vmPoolId from the vm object Done Line 54: List<DbUser> users = getDbUserDAO().getAllForVm(getVmId()); Line 55: // Check if this is a Vm from a Vm pool, and is attached to a user Line 56: if (map != null && users != null && !users.isEmpty()) { Line 57: VmPool pool = getVmPoolDAO().get(map.getvm_pool_id()); Line 94: * @param vmId Line 95: */ Line 96: private void removeStatelessVmUnmanagedDevices() { Line 97: VM vm = getVm(); Line 98: if (vm != null && vm.isStateless() || isRunOnce()) { > please add brackets after the 'and' I added a canDoAction for that instead of checking everywhere Line 99: final List<VmDevice> vmDevices = Line 100: DbFacade.getInstance() Line 101: .getVmDeviceDao() Line 102: .getUnmanagedDevicesByVmId(getVmId()); -- To view, visit http://gerrit.ovirt.org/28146 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0325e208aa9a76ad859ffff502d02e89f0001caa Gerrit-PatchSet: 12 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