Liran Zelkha has posted comments on this change.

Change subject: core: Support decreasing dc compatbility version
......................................................................


Patch Set 6:

(4 comments)

http://gerrit.ovirt.org/#/c/26947/6/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommand.java:

Line 201: null
> networks cannot be null
Done


Line 200:                     List<Network> networks = 
getNetworkDAO().getAllForDataCenter(getStoragePoolId());
Line 201:                     if (networks != null && !networks.isEmpty()) {
Line 202: 
Line 203:                         Network network = networks.get(0);
Line 204:                         NetworkValidator validator = 
getNetworkValidator(network);
> Using the validator this way will not achieve the desired behaviour, mainly
Done
Line 205:                         if (networks.size() != 1 || 
!NetworkUtils.isManagementNetwork(networks.get(0))
Line 206:                                 || 
!validator.canNetworkCompatabilityBeDecreased()) {
Line 207:                             returnValue = false;
Line 208:                             
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_DECREASE_COMPATIBILITY_VERSION);


Line 205: networks
> this condition should be united with the former.
I moved it to the else part, since logically it's a different test.


Line 253:         return masterDomainForPool;
Line 254:     }
Line 255: 
Line 256:     @Override
Line 257:     protected NetworkDao getNetworkDAO() {
> is this necessary ? you don't modify the behaviour of the overridden method
Only way to inject it, as it's a protected method.
Line 258:         return getDbFacade().getNetworkDao();
Line 259:     }
Line 260: 
Line 261:     protected NetworkValidator getNetworkValidator(Network network) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3bb99e4773ee5592483ad055b277641ebc63cae1
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to