Vered Volansky has posted comments on this change. Change subject: core: Verifying storage space for AddDiskCommand ......................................................................
Patch Set 6: (3 comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/StorageDomainValidator.java Line 85: double totalSizeForDisks = 0.0; Line 86: Line 87: for (DiskImage diskImage : diskImages) { Line 88: double sizeForDisk = diskImage.getSize(); //This is disk capacity Line 89: Agreed Line 90: if (diskImage.getVolumeFormat() == VolumeFormat.COW) { Line 91: if (storageDomain.getStorageType().isFileDomain()) { Line 92: sizeForDisk = EMPTY_QCOW_HEADER_SIZE; Line 93: } else { Line 106: return hasSpaceForNewDisks(Collections.singleton(diskImage)); Line 107: } Line 108: Line 109: private ValidationResult validateRequiredSpace(double availableSize, double sizeToCompare) { Line 110: if (availableSize >= sizeToCompare) { Will improve that, still thinking how exactly. Line 111: return ValidationResult.VALID; Line 112: } Line 113: Line 114: return new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_TARGET_STORAGE_DOMAIN, .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/DiskImage.java Line 279: Line 280: @JsonIgnore Line 281: public double getActualDiskWithSnapshotsSizeInBytes() { Line 282: return getActualDiskWithSnapshotsSize() * 1024L * 1024L * 1024L; Line 283: } Will do Line 284: Line 285: /** Line 286: * This method is created for SOAP serialization of primitives that are read only but sent by the client. The setter Line 287: * implementation is empty and the field is not being changed. -- To view, visit http://gerrit.ovirt.org/15377 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1a33502683ec77fba09efffba1438beb552082f7 Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Vered Volansky <vvola...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com> 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