Liron Aravot has posted comments on this change.

Change subject: core: Preventing moving a shareable disk to a Gluster domain
......................................................................


Patch Set 6:

(2 comments)

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

Line 153:     }
Line 154: 
Line 155:     protected boolean validateDestStorage() {
Line 156:         // Validate shareable disks moving
Line 157:         if (getParameters().getOperation() == ImageOperation.Move) {
let's merge the 3 IF's into 1
Line 158:             if (getImage().isShareable()) {
Line 159:                 if 
(getStorageDomain().getStorageType().equals(StorageType.GLUSTERFS)) {
Line 160:                     return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_CANT_MOVE_SHAREABLE_DISK_TO_GLUSTERFS,
Line 161:                             String.format("$%1$s %2$s", "diskAlias", 
getImage().getDiskAlias()));


Line 161:                             String.format("$%1$s %2$s", "diskAlias", 
getImage().getDiskAlias()));
Line 162:                 }
Line 163:             }
Line 164:         }
Line 165: 
change the order, otherwise in case the domain doesn't exist we'll fail with 
NPE.
Line 166:         StorageDomainValidator validator = new 
StorageDomainValidator(getStorageDomain());
Line 167:         return validate(validator.isDomainExistAndActive())
Line 168:                 && validate(validator.domainIsValidDestination());
Line 169:     }


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I37e500e86d2b6094bb257221a4ca899590aed610
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram <aavi...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Amit Aviram <aavi...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Idan Shaby <ish...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@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