abh1sar commented on code in PR #10140:
URL: https://github.com/apache/cloudstack/pull/10140#discussion_r1918199072


##########
server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java:
##########
@@ -748,6 +819,151 @@ private Backup.VolumeInfo 
getVolumeInfo(List<Backup.VolumeInfo> backedUpVolumes,
         return null;
     }
 
+    @Override
+    public void updateDiskOfferingSizeFromBackup(List<DiskOfferingInfo> 
dataDiskOfferingsInfo, Backup backup) {
+        List<DiskOfferingInfo> dataDiskOfferingsInfoFromBackup = 
getDataDiskOfferingListFromBackup(backup);
+        int index = 0;
+        for(DiskOfferingInfo diskOfferingInfo : dataDiskOfferingsInfo) {
+            diskOfferingInfo.setSize(Math.max(diskOfferingInfo.getSize(), 
dataDiskOfferingsInfoFromBackup.get(index).getSize()));

Review Comment:
   A volume with fixed size disk offering of 5gb can be resized later to 7gb. 
In that case backup details table will have the disk size as 7GB.



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to