Vered Volansky has posted comments on this change.

Change subject: engine: CanDoAction of Update/AddNetworkCommand
......................................................................


Patch Set 1: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/dc/AddNetworkCommand.java
Line 39:     }
Line 40: 
Line 41:     @Override
Line 42:     protected boolean canDoAction() {
Line 43:         List<Network> all = getNetworks();
I agree this is very clean, but getNetworks() isn't a simple getter and 
shouldn't be called if you fail beforehand. I'd separate into two ifs.
Line 44:         return validate(vmNetworkSetCorrectly())
Line 45:                 && validate(stpForVmNetworkOnly())
Line 46:                 && validate(mtuValid())
Line 47:                 && validate(networkPrefixValid())


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/dc/UpdateNetworkCommand.java
Line 42: 
Line 43:     @Override
Line 44:     protected boolean canDoAction() {
Line 45:         List<Network> networks = getNetworkDAO().getAll();
Line 46:         Network oldNetwork = getNetworkById(networks);
Same comment as previous file.
Line 47:         return validate(storagePoolExists())
Line 48:                 && validate(vmNetworkSetCorrectly())
Line 49:                 && validate(stpForVmNetworkOnly())
Line 50:                 && validate(mtuValid())


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifcf0f43957eddfd55261832729931579abbc3e8d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Muli Salem <msa...@redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to