nvazquez commented on code in PR #9545: URL: https://github.com/apache/cloudstack/pull/9545#discussion_r1721931735
########## server/src/main/java/com/cloud/template/HypervisorTemplateAdapter.java: ########## @@ -359,6 +361,16 @@ public List<TemplateOrVolumePostUploadCommand> doInTransaction(TransactionStatus throw new CloudRuntimeException("Unable to persist the template " + profile.getTemplate()); } + // Set Event Details for Template/ISO Upload + String eventType = template.getFormat().equals(ImageFormat.ISO) ? "Iso" : "Template"; + String eventResourceId = template.getUuid(); + CallContext.current().setEventDetails(String.format("%s Id: %s", eventType, eventResourceId)); + CallContext.current().putContextParameter(eventType.equals("Iso") ? eventType : VirtualMachineTemplate.class, eventResourceId); + if (template.getFormat().equals(ImageFormat.ISO)) { Review Comment: Yes, otherwise the event resource was not being obtained. For templates it wasn't needed as the event resource was properly set on the event -- 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