Allon Mureinik has posted comments on this change.

Change subject: core: Extract SD validations from ImagesHandler
......................................................................


Patch Set 7: (4 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmCommand.java
Line 27: import 
org.ovirt.engine.core.common.businessentities.Disk.DiskStorageType;
Line 28: import org.ovirt.engine.core.common.businessentities.DiskImage;
Line 29: import org.ovirt.engine.core.common.businessentities.Snapshot;
Line 30: import 
org.ovirt.engine.core.common.businessentities.Snapshot.SnapshotType;
Line 31: import org.ovirt.engine.core.common.businessentities.StorageDomain;
This is Eclipse's auto-formatting.
I could separate it if you think it's worth the hassle.
Line 32: import org.ovirt.engine.core.common.businessentities.StorageDomainType;
Line 33: import 
org.ovirt.engine.core.common.businessentities.StoragePoolIsoMapId;
Line 34: import org.ovirt.engine.core.common.businessentities.VM;
Line 35: import org.ovirt.engine.core.common.businessentities.VmTemplate;


Line 173: 
Line 174:         return true;
Line 175:     }
Line 176: 
Line 177:     @Override
same.
Line 178:     protected boolean 
doesStorageDomainhaveSpaceForRequest(StorageDomain storageDomain, long 
sizeRequested) {
Line 179:         return validate(new 
StorageDomainValidator(storageDomain).isDomainHasSpaceForRequest(sizeRequested));
Line 180:     }
Line 181: 


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
Line 363:         String fileName = Path.GetFileName(windowsPath);
Line 364:         return String.format("%1$s/%2$s", isoPrefix, fileName);
Line 365:     }
Line 366: 
Line 367:     public static boolean isImagesExists(Iterable<DiskImage> images, 
Guid storagePoolId) {
Agreed,
but not in this patch, it's large enough as is.
Line 368:         return isImagesExists(images, storagePoolId, new 
ArrayList<DiskImage>());
Line 369:     }
Line 370: 
Line 371:     private static boolean isImagesExists(Iterable<DiskImage> images, 
Guid storagePoolId, ArrayList<DiskImage> irsImages) {


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskCommand.java
Line 230:         if (!listVms.isEmpty()) {
Line 231:             Guid storagePoolId = listVms.get(0).getStoragePoolId();
Line 232:             storage_pool sp = getStoragePoolDAO().get(storagePoolId);
Line 233:             if (!validate(new StoragePoolValidator(sp).isUp())) {
Line 234:                 return false;
Agree - this is probably a rebase foobar - will fix.
Line 235:             }
Line 236: 
Line 237:             if (!ImagesHandler.PerformImagesChecks(
Line 238:                     getReturnValue().getCanDoActionMessages(),


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4cfc895dceed4de520476ed5e3fa9c1c7cfd78f4
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to