You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/11/06 15:09:36 UTC

[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #4452: Consider other conditions while listing templates with id

DaanHoogland commented on a change in pull request #4452:
URL: https://github.com/apache/cloudstack/pull/4452#discussion_r518810401



##########
File path: server/src/main/java/com/cloud/api/query/QueryManagerImpl.java
##########
@@ -3434,11 +3434,6 @@ else if (!template.isPublicTemplate() && caller.getType() != Account.ACCOUNT_TYP
                 domain = _domainDao.findById(Domain.ROOT_DOMAIN);
             }
 
-            // List<HypervisorType> hypers = null;
-            // if (!isIso) {
-            // hypers = _resourceMgr.listAvailHypervisorInZone(null, null);
-            // }
-

Review comment:
       👍 

##########
File path: server/src/main/java/com/cloud/api/query/QueryManagerImpl.java
##########
@@ -3486,17 +3481,6 @@ else if (!template.isPublicTemplate() && caller.getType() != Account.ACCOUNT_TYP
                 }
             }
 
-            if (!isIso) {
-                // add hypervisor criteria for template case
-                if (hypers != null && !hypers.isEmpty()) {
-                    String[] relatedHypers = new String[hypers.size()];
-                    for (int i = 0; i < hypers.size(); i++) {
-                        relatedHypers[i] = hypers.get(i).toString();
-                    }
-                    sc.addAnd("hypervisorType", SearchCriteria.Op.IN, relatedHypers);
-                }
-            }
-

Review comment:
       can you make it a method and put the call ...




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org