api: Expose backing image disk download progress
Longhorn
@@ -133,6 +133,7 @@ type BackingImage struct {
Name string `json:"name"`
ImageURL string `json:"imageURL"`
DiskStateMap map[string]string `json:"diskStateMap"`
+ DownloadProgressMap map[string]int `json:"downloadProgressMap"`
DeletionTimestamp string `json:"deletionTimestamp"`
}
@@ -1129,6 +1130,7 @@ func toBackingImageResource(bi *longhorn.BackingImage, apiContext *api.ApiContex
Name: bi.Name,
ImageURL: bi.Spec.ImageURL,
DiskStateMap: diskStateMap,
+ DownloadProgressMap: bi.Status.DiskDownloadProgressMap,
DeletionTimestamp: deletionTimestamp,
}
