nvazquez commented on a change in pull request #3553: [WIP] [DO NOT MERGE] CloudStack Backup & Recovery Framework URL: https://github.com/apache/cloudstack/pull/3553#discussion_r357927637
########## File path: engine/schema/src/main/java/com/cloud/storage/dao/DiskOfferingDaoImpl.java ########## @@ -132,6 +143,38 @@ public DiskOfferingVO persistDeafultDiskOffering(DiskOfferingVO offering) { } } + protected long getClosestDiskSizeInGB(long sizeInBytes) { + if (sizeInBytes < 0) { + throw new CloudRuntimeException("Disk size should be greater than 0 bytes, received: " + sizeInBytes + " bytes"); + } + long div = sizeInBytes / GB_UNIT_BYTES; + long rest = sizeInBytes % GB_UNIT_BYTES; + return rest == 0L ? div : div + 1; + } + + @Override + public List<DiskOfferingVO> listAllBySizeAndProvisioningType(long size, Storage.ProvisioningType provisioningType) { + StringBuilder sql = new StringBuilder(SizeDiskOfferingSearch); + TransactionLegacy txn = TransactionLegacy.currentTxn(); + List<DiskOfferingVO> offerings = new ArrayList<>(); + try(PreparedStatement pstmt = txn.prepareStatement(sql.toString());){ Review comment: Unnecessary semicolon here and also on line 164 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services