@@ -1309,7 +1309,7 @@ public Set<Pair<Long, Long>> listIsos(ListIsosCmd cmd) throws IllegalArgumentExc
13091309 HypervisorType hypervisorType = HypervisorType .getType (cmd .getHypervisor ());
13101310 return listTemplates (cmd .getId (), cmd .getIsoName (), cmd .getKeyword (), isoFilter , true , cmd .isBootable (), cmd .getPageSizeVal (),
13111311 cmd .getStartIndex (), cmd .getZoneId (), hypervisorType , true , cmd .listInReadyState (), permittedAccounts , caller ,
1312- listProjectResourcesCriteria , tags );
1312+ listProjectResourcesCriteria , tags , cmd . getZoneType () );
13131313 }
13141314
13151315 @ Override
@@ -1342,12 +1342,12 @@ public Set<Pair<Long, Long>> listTemplates(ListTemplatesCmd cmd) throws IllegalA
13421342 HypervisorType hypervisorType = HypervisorType .getType (cmd .getHypervisor ());
13431343
13441344 return listTemplates (id , cmd .getTemplateName (), cmd .getKeyword (), templateFilter , false , null , cmd .getPageSizeVal (), cmd .getStartIndex (),
1345- cmd .getZoneId (), hypervisorType , showDomr , cmd .listInReadyState (), permittedAccounts , caller , listProjectResourcesCriteria , tags );
1345+ cmd .getZoneId (), hypervisorType , showDomr , cmd .listInReadyState (), permittedAccounts , caller , listProjectResourcesCriteria , tags , cmd . getZoneType () );
13461346 }
13471347
13481348 private Set <Pair <Long , Long >> listTemplates (Long templateId , String name , String keyword , TemplateFilter templateFilter , boolean isIso ,
13491349 Boolean bootable , Long pageSize , Long startIndex , Long zoneId , HypervisorType hyperType , boolean showDomr , boolean onlyReady ,
1350- List <Account > permittedAccounts , Account caller , ListProjectResourcesCriteria listProjectResourcesCriteria , Map <String , String > tags ) {
1350+ List <Account > permittedAccounts , Account caller , ListProjectResourcesCriteria listProjectResourcesCriteria , Map <String , String > tags , String zoneType ) {
13511351
13521352 VMTemplateVO template = null ;
13531353 if (templateId != null ) {
@@ -1388,7 +1388,7 @@ private Set<Pair<Long, Long>> listTemplates(Long templateId, String name, String
13881388 startIndex , zoneId , hyperType , onlyReady , showDomr , permittedAccounts , caller , tags );
13891389 Set <Pair <Long , Long >> templateZonePairSet2 = new HashSet <Pair <Long , Long >>();
13901390 templateZonePairSet2 = _templateDao .searchTemplates (name , keyword , templateFilter , isIso , hypers , bootable , domain , pageSize ,
1391- startIndex , zoneId , hyperType , onlyReady , showDomr , permittedAccounts , caller , listProjectResourcesCriteria , tags );
1391+ startIndex , zoneId , hyperType , onlyReady , showDomr , permittedAccounts , caller , listProjectResourcesCriteria , tags , zoneType );
13921392
13931393 for (Pair <Long , Long > tmpltPair : templateZonePairSet2 ) {
13941394 if (!templateZonePairSet .contains (new Pair <Long , Long >(tmpltPair .first (), -1L ))) {
@@ -1412,7 +1412,7 @@ private Set<Pair<Long, Long>> listTemplates(Long templateId, String name, String
14121412 Set <Pair <Long , Long >> templateZonePairSet2 = new HashSet <Pair <Long , Long >>();
14131413 templateZonePairSet2 = _templateDao .searchTemplates (name , keyword , templateFilter , isIso , hypers ,
14141414 bootable , domain , pageSize , startIndex , zoneId , hyperType , onlyReady , showDomr ,
1415- permittedAccounts , caller , listProjectResourcesCriteria , tags );
1415+ permittedAccounts , caller , listProjectResourcesCriteria , tags , zoneType );
14161416
14171417 for (Pair <Long , Long > tmpltPair : templateZonePairSet2 ) {
14181418 if (!templateZonePairSet .contains (new Pair <Long , Long >(tmpltPair .first (), -1L ))) {
@@ -1430,7 +1430,7 @@ private Set<Pair<Long, Long>> listTemplates(Long templateId, String name, String
14301430 } else {
14311431 if (template == null ) {
14321432 templateZonePairSet = _templateDao .searchTemplates (name , keyword , templateFilter , isIso , hypers , bootable , domain , pageSize ,
1433- startIndex , zoneId , hyperType , onlyReady , showDomr , permittedAccounts , caller , listProjectResourcesCriteria , tags );
1433+ startIndex , zoneId , hyperType , onlyReady , showDomr , permittedAccounts , caller , listProjectResourcesCriteria , tags , zoneType );
14341434 } else {
14351435 // if template is not public, perform permission check here
14361436 if (!template .isPublicTemplate () && caller .getType () != Account .ACCOUNT_TYPE_ADMIN ) {
0 commit comments