abh1sar commented on code in PR #10140:
URL: https://github.com/apache/cloudstack/pull/10140#discussion_r1918196373
##########
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()));
+ index++;
+ }
+ }
+
+ @Override
+ public DiskOfferingInfo getRootDiskOfferingInfoFromBackup(Backup backup) {
+ String diskOfferingIdsDetail =
backup.getDetail(ApiConstants.DISK_OFFERING_IDS);
Review Comment:
For older backups User will get an error "Backup doesn't contain service
offering uuid. Please specify a valid service offering id while creating the
instance"
User will have to click on Configure Instance button and provide inputs.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]