Giuseppe Vallarelli has posted comments on this change.

Change subject: engine: Remove vnic profiles of a removed a data-center
......................................................................


Patch Set 2: (2 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/RemoveStoragePoolCommand.java
Line 87:         MacPoolManager.getInstance().freeMacs(macsToRemove);
Line 88:         setSucceeded(true);
Line 89:     }
Line 90: 
Line 91:     private void removeNetworks() {
Ok, thanks for the explanation.
Line 92:         TransactionSupport.executeInNewTransaction(new 
TransactionMethod<Void>() {
Line 93: 
Line 94:             @Override
Line 95:             public Void runInTransaction() {


Line 96:                 final List<Network> networks = 
getNetworkDAO().getAllForDataCenter(getStoragePoolId());
Line 97:                 for (final Network net : networks) {
Line 98:                     List<VnicProfile> profiles = 
getDbFacade().getVnicProfileDao().getAllForNetwork(net.getId());
Line 99:                     for (VnicProfile vnicProfile : profiles) {
Line 100:                         
getCompensationContext().snapshotEntity(vnicProfile);
I would expect to find such code (100-101) under the vnicProfile object with a 
method like remove(), both lines use details related to a vnic. What do you 
think?
Line 101:                         
getDbFacade().getVnicProfileDao().remove(vnicProfile.getId());
Line 102:                     }
Line 103:                     getCompensationContext().snapshotEntity(net);
Line 104:                     getNetworkDAO().remove(net.getId());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ifb399dc916983780be9895278e9335e3631ad1cd
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <[email protected]>
Gerrit-Reviewer: Giuseppe Vallarelli <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[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