Maor Lipchuk has posted comments on this change.
Change subject: core: simplify validation logic
......................................................................
Patch Set 2: (2 inline comments)
simplify validation logic looks good. although many changes in this patch, are
not related to it.
I would consider separate this patch to two patches
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java
Line 359: }
Line 360:
Line 361: private boolean validateProvidedDestinations() {
Line 362: for (DiskImage diskImage : diskInfoDestinationMap.values()) {
Line 363: if (diskImage.getstorage_ids() == null ||
diskImage.getstorage_ids().isEmpty()) {
Is it related to this patch?
Line 364: diskImage.setstorage_ids(new ArrayList<Guid>());
Line 365:
diskImage.getstorage_ids().add(getParameters().getStorageDomainId());
Line 366: }
Line 367: Guid storageDomainId = diskImage.getstorage_ids().get(0);
Line 424:
Line 425: // Set default quota id for each disk image in the source if
storage pool enforcement is disabled.
Line 426: for (DiskImage diskImage :
getImagesToCheckDestinationStorageDomains()) {
Line 427: diskImage.setQuotaId(QuotaHelper.getInstance()
Line 428: .getQuotaIdToConsume(diskImage.getQuotaId(),
getStoragePool()));
How this change related to this patch?
Line 429: }
Line 430: if (!isInternalExecution()) {
Line 431: return
QuotaManager.validateMultiStorageQuota(getStoragePool().getQuotaEnforcementType(),
Line 432:
getQuotaConsumeMap(diskInfoDestinationMap.values()),
--
To view, visit http://gerrit.ovirt.org/5708
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I3a5ba45b8d67977aa29148a0c18e26fcb72b01e5
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches