mirror of https://github.com/apache/cloudstack.git
bug 8830: added source template id to template usage records
status 8830: resolved fixed
This commit is contained in:
parent
7ca66c132d
commit
6bd8cece48
|
|
@ -382,7 +382,7 @@ public class DownloadMonitorImpl implements DownloadMonitor {
|
|||
eventType = EventTypes.EVENT_ISO_CREATE;
|
||||
}
|
||||
if(template.getAccountId() != Account.ACCOUNT_ID_SYSTEM){
|
||||
UsageEventVO usageEvent = new UsageEventVO(eventType, template.getAccountId(), host.getDataCenterId(), template.getId(), template.getName(), null, null , size);
|
||||
UsageEventVO usageEvent = new UsageEventVO(eventType, template.getAccountId(), host.getDataCenterId(), template.getId(), template.getName(), null, template.getSourceTemplateId() , size);
|
||||
_usageEventDao.persist(usageEvent);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -542,7 +542,7 @@ public class TemplateManagerImpl implements TemplateManager, Manager, TemplateSe
|
|||
_downloadMonitor.copyTemplate(vmTemplate, srcSecHost, dstSecHost);
|
||||
|
||||
if(account.getId() != Account.ACCOUNT_ID_SYSTEM){
|
||||
UsageEventVO usageEvent = new UsageEventVO(copyEventType, account.getId(), destZoneId, templateId, null, null, null, srcTmpltHost.getSize());
|
||||
UsageEventVO usageEvent = new UsageEventVO(copyEventType, account.getId(), destZoneId, templateId, null, null, vmTemplate.getSourceTemplateId(), srcTmpltHost.getSize());
|
||||
_usageEventDao.persist(usageEvent);
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1565,7 +1565,7 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
|||
_templateHostDao.persist(templateHostVO);
|
||||
|
||||
UsageEventVO usageEvent = new UsageEventVO(EventTypes.EVENT_TEMPLATE_CREATE, privateTemplate.getAccountId(), secondaryStorageHost.getDataCenterId(), privateTemplate.getId(),
|
||||
privateTemplate.getName(), null, null, templateHostVO.getSize());
|
||||
privateTemplate.getName(), null, privateTemplate.getSourceTemplateId(), templateHostVO.getSize());
|
||||
_usageEventDao.persist(usageEvent);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue