Gilad Chaplik has posted comments on this change.

Change subject: webadmin: Add validation for create/edit pool (#849426)
......................................................................


Patch Set 2: No score

(2 inline comments)

as I said in my of my comments, I think it's rather complicated 
(inheritance+union+dummy), consider changing that, of at least stick with one.

....................................................
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/PoolModelBehaviorBase.java
Line 318:                         new LengthValidation(4),
Line 319:                         new IntegerValidation(isNew ? 1 : 0, isNew ? 
maxAllowedVms : maxAllowedVms - assignedVms)
Line 320:                 },
Line 321: 
Line 322:                         getNumOfDesktopsSpecificValidations()
no, I would like it better if you'll move *all* the validations into the 
override method, in this case you won't need to use the union.
you must agree that something look a bit over complicated for a simple getArray 
method; inheritance, union, and a dummy class.
Line 323:                 )
Line 324:                 );
Line 325: 
Line 326:         getModel().getPrestartedVms().ValidateEntity(


....................................................
File 
frontend/webadmin/modules/uicommonweb/src/test/java/org/ovirt/engine/ui/uicommonweb/validation/ExistingPoolNameLengthValidationTest.java
Line 7: import org.junit.Test;
Line 8: import org.ovirt.engine.core.common.businessentities.VmOsType;
Line 9: 
Line 10: public class ExistingPoolNameLengthValidationTest {
Line 11: 
how do you run the tests?
Line 12:     @Test
Line 13:     public void getPoolName_noVmsAlloved() {
Line 14:         assertGeneratesCorrect(5, 4, 0);
Line 15:     }


--
To view, visit http://gerrit.ovirt.org/7649
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I66f765ceb0567beb006d1ef4f45db3902ef95ea6
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to