mirror of https://github.com/apache/cloudstack.git
bug 8806: fixing list hypervisors
status 8806: resolved fixed
This commit is contained in:
parent
f3b58a4b0a
commit
68aa8c4eb7
|
|
@ -67,7 +67,7 @@ public class ClusterDaoImpl extends GenericDaoBase<ClusterVO, Long> implements C
|
|||
PodSearch.done();
|
||||
|
||||
ZoneSearch = createSearchBuilder();
|
||||
ZoneSearch.and("dataCenterId", ZoneSearch.entity().getPodId(), SearchCriteria.Op.EQ);
|
||||
ZoneSearch.and("dataCenterId", ZoneSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ);
|
||||
ZoneSearch.done();
|
||||
|
||||
AvailHyperSearch = createSearchBuilder();
|
||||
|
|
|
|||
|
|
@ -4718,17 +4718,22 @@ public class ManagementServerImpl implements ManagementServer {
|
|||
}
|
||||
return hypers.split(",");
|
||||
} else {
|
||||
String[] result = null;
|
||||
int i = 0;
|
||||
List<ClusterVO> clustersForZone = _clusterDao.listByZoneId(zoneId);
|
||||
if(clustersForZone != null && clustersForZone.size() > 0) {
|
||||
result = new String[clustersForZone.size()];
|
||||
int i = 0;
|
||||
Set<String> result = new HashSet<String>();
|
||||
for(ClusterVO cluster : clustersForZone) {
|
||||
result[i++] = cluster.getHypervisorType().toString();
|
||||
result.add(cluster.getHypervisorType().toString());
|
||||
}
|
||||
|
||||
String[] resultArray = new String[result.size()];
|
||||
for(String entity : result) {
|
||||
resultArray[i++] = entity;
|
||||
}
|
||||
return resultArray;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue