Ayal Baron has posted comments on this change. Change subject: core: Extracted VmValidator ......................................................................
Patch Set 6: (2 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/VmValidator.java Line 15: this.vm = vm; Line 16: } Line 17: Line 18: /** @return Validation result that indicates if the VM is during migration or not. */ Line 19: public ValidationResult vmNotDuringMigration() { if you're already changing this, why not name the function properly? vmMigrating or something else (positive) Line 20: if (vm.getstatus() == VMStatus.MigratingFrom || vm.getstatus() == VMStatus.MigratingTo) { Line 21: return new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_MIGRATION_IN_PROGRESS); Line 22: } Line 23: Line 23: Line 24: return ValidationResult.VALID; Line 25: } Line 26: Line 27: public ValidationResult vmNotRunningStateless() { same here vmRunningStateless Line 28: if (DbFacade.getInstance().getSnapshotDao().exists(vm.getId(), SnapshotType.STATELESS)) { Line 29: VdcBllMessages message = vm.isStatusUp() ? VdcBllMessages.ACTION_TYPE_FAILED_VM_RUNNING_STATELESS : Line 30: VdcBllMessages.ACTION_TYPE_FAILED_VM_HAS_STATELESS_SNAPSHOT_LEFTOVER; Line 31: return new ValidationResult(message); -- To view, visit http://gerrit.ovirt.org/8101 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I6c76d242d7722f7271ead094e0cc936588db22d1 Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Ayal Baron <aba...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches