Allon Mureinik has posted comments on this change.

Change subject: core: Extracted VmValidator
......................................................................


Patch Set 6: (1 inline comment)

....................................................
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() {
Note that this methods return a ValidationResult, not a boolean.

This is used in canDoAction()s, where the checks represent valid states for the 
action.
not sure it would be more readable to reverse this.
Can you give an implementation example?
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: 


--
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

Reply via email to