Omer Frenkel has posted comments on this change. Change subject: engine: watchdog - DB and logic changes ......................................................................
Patch Set 18: (5 inline comments) some minor comments .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractVmWatchdogCommand.java Line 50: Line 51: @Override Line 52: protected boolean canDoAction() { Line 53: if (getParameters().getId() == null || !entityExists()) { Line 54: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND); this message is specific for vm Line 55: } Line 56: return true; Line 57: } Line 58: Line 56: return true; Line 57: } Line 58: Line 59: protected boolean entityExists() { Line 60: if(getParameters().isVm()) { please use project formatter (for all changes) Line 61: return getVmDAO().get(getParameters().getId()) != null; Line 62: } else { Line 63: return getVmTemplateDAO().get(getParameters().getId()) != null; Line 64: } .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateWatchdogCommand.java Line 27: if (!super.canDoAction()) { Line 28: return false; Line 29: } Line 30: List<VmDevice> watchdogs = Line 31: getVmDeviceDao().getVmDeviceByVmIdAndType(getParameters().getId(), VmDeviceType.WATCHDOG.getName()); better use getWatchdogs() Line 32: if (watchdogs.isEmpty()) { Line 33: return failCanDoAction(VdcBllMessages.WATCHDOG_NOT_FOUND); Line 34: } Line 35: return true; .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VdcActionType.java Line 242: Line 243: AddWatchdog(1600, ActionGroup.CREATE_VM, QuotaDependency.NONE), Line 244: UpdateWatchdog(1601, ActionGroup.CREATE_VM, QuotaDependency.NONE), Line 245: RemoveWatchdog(1602, ActionGroup.CREATE_VM, QuotaDependency.NONE), Line 246: ; probably should be EDIT_VM_PROPERTIES Line 247: Line 248: Line 249: private int intValue; Line 250: private ActionGroup actionGroup; .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmWatchdogAction.java Line 4: none, Line 5: reset, Line 6: poweroff, Line 7: dump, Line 8: pause; enum memebers should be in upper case Line 9: public static VmWatchdogAction getByName(String name) { Line 10: if (name == null || name.length() == 0) { Line 11: return null; Line 12: } else { -- To view, visit http://gerrit.ovirt.org/13057 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I813a6f97e23008d15446285998a4e9b50b456040 Gerrit-PatchSet: 18 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Laszlo Hornyak <lhorn...@redhat.com> Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Laszlo Hornyak <lhorn...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches