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


##########
api/src/main/java/org/apache/cloudstack/backup/BackupProvider.java:
##########
@@ -110,9 +111,28 @@ public interface BackupProvider {
 
     /**
      * This method should TODO
+     *
      * @param restorePoint the restore point to create a backup for
-     * @param vm The machine for which to create a backup
-     * @param metric the metric object to update with the new backup data
+     * @param vm           The machine for which to create a backup
+     */
+    Backup createNewBackupEntryForRestorePoint(Backup.RestorePoint 
restorePoint, VirtualMachine vm);
+
+    /**
+     * Returns if the backup provider supports creating new instance from 
backup
      */
-    Backup createNewBackupEntryForRestorePoint(Backup.RestorePoint 
restorePoint, VirtualMachine vm, Backup.Metric metric);
+    boolean supportsInstanceFromBackup();
+
+    /**
+     * Returns the backup storage usage (Used, Total) for a backup provider
+     * @param zoneId the zone for which to return metrics
+     * @return a pair of Used size and Total size for the backup storage
+     */
+    Pair<Long, Long> getBackupStorageStats(Long zoneId);

Review Comment:
   @JoaoJandre This is not related to create instance from backup, but backup 
in general.
   This PR contains lots of generic backup improvements.
   In hindsight, I would have raised separate PRs, but it will be very 
difficult to break the PR now.
   Even if the commits can be separated, they still are changing similar set of 
files and separating them will require lot of merging and unmerging, which is 
bound to introduce bugs.
   
   I am sorry. This PR is quite big and difficult to review. I'll take this as 
a lesson going forward.



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