mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3314: templates downloaded to S3 should show up in
listTemplates when zoneId is provided.
This commit is contained in:
parent
8a0470ee0f
commit
9a3067fb87
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue