You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2013/07/03 00:49:32 UTC

git commit: updated refs/heads/4.2 to 0314a99

Updated Branches:
  refs/heads/4.2 90824fc36 -> 0314a9971


CLOUDSTACK-3314: templates downloaded to S3 should show up in
listTemplates when zoneId is provided.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0314a997
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0314a997
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0314a997

Branch: refs/heads/4.2
Commit: 0314a997183bc2fc0a00d61215cdf9139305a40d
Parents: 90824fc
Author: Min Chen <mi...@citrix.com>
Authored: Tue Jul 2 15:47:31 2013 -0700
Committer: Min Chen <mi...@citrix.com>
Committed: Tue Jul 2 15:49:14 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/api/query/QueryManagerImpl.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0314a997/server/src/com/cloud/api/query/QueryManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java
index 18091aa..90a3b6f 100644
--- a/server/src/com/cloud/api/query/QueryManagerImpl.java
+++ b/server/src/com/cloud/api/query/QueryManagerImpl.java
@@ -2877,7 +2877,8 @@ public class QueryManagerImpl extends ManagerBase implements QueryService {
 
             if (zoneId != null) {
                 SearchCriteria<TemplateJoinVO> zoneSc = _templateJoinDao.createSearchCriteria();
-                zoneSc.addAnd("dataCenterId", SearchCriteria.Op.EQ, zoneId);
+                zoneSc.addOr("dataCenterId", SearchCriteria.Op.EQ, zoneId);
+                zoneSc.addOr("dataStoreScope", SearchCriteria.Op.EQ, ScopeType.REGION);
                 // handle the case where xs-tools.iso and vmware-tools.iso do not have data_center information in template_view
                 SearchCriteria<TemplateJoinVO> isoPerhostSc = _templateJoinDao.createSearchCriteria();
                 isoPerhostSc.addAnd("format", SearchCriteria.Op.EQ, ImageFormat.ISO);