Moti Asayag has posted comments on this change.

Change subject: engine: Refactored code into NetworkValidator class
......................................................................


Patch Set 4: (1 inline comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/dc/RemoveNetworkCommand.java
Line 24:     }
Line 25: 
Line 26:     @Override
Line 27:     protected boolean canDoAction() {
Line 28:         NetworkValidator validator = new 
NetworkValidator(getNetworkDAO().get(getNetwork().getId()));
I think that in order to be safe in getNetwork().getId() we should add
to AddNetworkStoragePoolParameters a @NotNull annotation for the network 
property.

So on parameters validation the action will fail if parameter wasn't provided 
properly.
Line 29:         return validate(validator.networkExists())
Line 30:                 && validate(validator.notManagementNetwork())
Line 31:                 && validate(validator.networkNotUsedByVms())
Line 32:                 && validate(validator.networkNotUsedByTemplates())


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icf40d81f0481c6b6dec141a71363888dc9e9a941
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to