Moti Asayag has posted comments on this change.

Change subject: engine: Moved action message parameters
......................................................................


Patch Set 1: Looks good to me, approved

(2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/dc/AddNetworkCommand.java
Line 25: 
Line 26:     @Override
Line 27:     protected void executeCommand() {
Line 28:         getParameters().getNetwork().setId(Guid.NewGuid());
Line 29:         
DbFacade.getInstance().getNetworkDao().save(getParameters().getNetwork());
another note for future patch: replace static references by the proper Dao 
getter.
Line 30:         addPermissions();
Line 31:         
getReturnValue().setActionReturnValue(getParameters().getNetwork().getId());
Line 32:         setSucceeded(true);
Line 33:     }


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/dc/RemoveNetworkCommand.java
Line 29:     @Override
Line 30:     protected boolean canDoAction() {
Line 31:         return CommonNetworkValidation(getParameters().getNetwork(), 
getReturnValue().getCanDoActionMessages());
Line 32:     }
Line 33: 
the next method should be pulled out to NetworkCommon class and could be 
defined as an instance method instead class method.

In addition, VdcBllMessages.NETWORK_CLUSTER_NETWORK_IN_USE is used by 
RemoveBondCommand so we should check that we do not have duplicate code that 
performs the same operation.
Line 34:     public static boolean CommonNetworkValidation(final Network 
network, java.util.ArrayList<String> canDoActionMessages) {
Line 35:         // check that network is not in use by cluster
Line 36:         if (network.getstorage_pool_id() != null) {
Line 37:             List<VDSGroup> groups = 
DbFacade.getInstance().getVdsGroupDao().getAllForStoragePool(


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

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

Reply via email to