abh1sar commented on code in PR #12373:
URL: https://github.com/apache/cloudstack/pull/12373#discussion_r2798367089
##########
server/src/main/java/com/cloud/template/TemplateManagerImpl.java:
##########
@@ -1376,8 +1375,15 @@ public boolean deleteTemplate(DeleteTemplateCmd cmd) {
vmInstanceVOList =
_vmInstanceDao.listNonExpungedByTemplate(templateId);
}
if(!cmd.isForced() && CollectionUtils.isNotEmpty(vmInstanceVOList)) {
- final String message = String.format("Unable to delete Template:
%s because Instance: [%s] are using it.", template,
Joiner.on(",").join(vmInstanceVOList));
- logger.warn(message);
+ String message = String.format("Unable to delete template with ID
%s, because there are VM instances using it.", template);
+ String instancesListMessage = String.format(" Instances list:
[%s].", StringUtils.join(vmInstanceVOList, ","));
+
Review Comment:
We can also add count of instances before printing the instance list
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]