Allon Mureinik has posted comments on this change. Change subject: core: Add VM - Storage allocation validation fix ......................................................................
Patch Set 1: Code-Review-1 (2 comments) http://gerrit.ovirt.org/#/c/36617/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java: Line 382: private boolean validateDomainsThreshold(StorageDomainValidator storageDomainValidator) { Line 383: return validate(storageDomainValidator.isDomainWithinThresholds()); Line 384: } Line 385: Line 386: //This validation is for thin provisioning, when done differently on other commands, this method should be overridden. please format this as a javadoc comment., Line 387: protected boolean validateFreeSpace(StorageDomainValidator storageDomainValidator, List<DiskImage> disksList) Line 388: { Line 389: // At this point the disks are the template's, which could have another volume type/format Line 390: // This change is for storage allocation validations, "real" override for these values is done in CreateSnapshotCommand. Line 389: // At this point the disks are the template's, which could have another volume type/format Line 390: // This change is for storage allocation validations, "real" override for these values is done in CreateSnapshotCommand. Line 391: for (DiskImage disk : disksList) { Line 392: disk.setVolumeType(VolumeType.Sparse); Line 393: disk.setvolumeFormat(VolumeFormat.COW); This will override the properties of the disk we're adding. If you want to to override just for the sake of validation, you should clone the disk. Line 394: } Line 395: return validate(storageDomainValidator.hasSpaceForNewDisks(disksList)); Line 396: } Line 397: -- To view, visit http://gerrit.ovirt.org/36617 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I13f8585a04157a55528ad4331455c3f156bdb84b Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Vered Volansky <vvola...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Vered Volansky <vvola...@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