use of com.cloud.api.query.vo.ImageStoreJoinVO in project cloudstack by apache.
the class ViewResponseHelper method createImageStoreResponse.
public static List<ImageStoreResponse> createImageStoreResponse(ImageStoreJoinVO... stores) {
Hashtable<Long, ImageStoreResponse> vrDataList = new Hashtable<Long, ImageStoreResponse>();
// Initialise the vrdatalist with the input data
for (ImageStoreJoinVO vr : stores) {
ImageStoreResponse vrData = vrDataList.get(vr.getId());
if (vrData == null) {
// first time encountering this vm
vrData = ApiDBUtils.newImageStoreResponse(vr);
} else {
// update tags
vrData = ApiDBUtils.fillImageStoreDetails(vrData, vr);
}
vrDataList.put(vr.getId(), vrData);
}
return new ArrayList<ImageStoreResponse>(vrDataList.values());
}
Aggregations