sureshanaparti commented on code in PR #12373:
URL: https://github.com/apache/cloudstack/pull/12373#discussion_r2809642446


##########
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 [%s] 
because there are VM [%d] instances using it.", template, 
vmInstanceVOList.size());

Review Comment:
   ```suggestion
               String message = String.format("Unable to delete template [%s] 
because there are [%d] VM  instances using it.", template, 
vmInstanceVOList.size());
   ```



-- 
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]

Reply via email to