mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fix size issue for template created from snapshot.
This commit is contained in:
parent
0ce01e56db
commit
3424ac86ad
@ -168,8 +168,12 @@ public class TemplateLocation {
|
||||
tmplInfo.isCorrupted = _isCorrupted;
|
||||
tmplInfo.isPublic = Boolean.parseBoolean(_props.getProperty("public"));
|
||||
tmplInfo.templateName = _props.getProperty("uniquename");
|
||||
if (_props.getProperty("virtualsize") != null) {
|
||||
tmplInfo.size = Long.parseLong(_props.getProperty("virtualsize"));
|
||||
}
|
||||
if (_props.getProperty("physicalSize") != null) {
|
||||
tmplInfo.physicalSize = Long.parseLong(_props.getProperty("physicalSize"));
|
||||
}
|
||||
|
||||
return tmplInfo;
|
||||
}
|
||||
|
||||
@ -222,6 +222,7 @@ public class TemplateObject implements TemplateInfo {
|
||||
templateStoreRef.setInstallPath(newTemplate.getPath());
|
||||
templateStoreRef.setDownloadPercent(100);
|
||||
templateStoreRef.setDownloadState(Status.DOWNLOADED);
|
||||
templateStoreRef.setSize(newTemplate.getSize());
|
||||
templateStoreDao.update(templateStoreRef.getId(), templateStoreRef);
|
||||
if (this.getDataStore().getRole() == DataStoreRole.Image) {
|
||||
VMTemplateVO templateVO = this.imageDao.findById(this.getId());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user