should use _hostDao.listByCluster instead of _hostDao.listByPodId in some places

This commit is contained in:
anthony 2010-10-08 18:05:40 -07:00
parent 5a4e75ebcd
commit a93d36d81a
2 changed files with 4 additions and 2 deletions

View File

@ -52,7 +52,7 @@ public class XenServerInvestigator extends AdapterBase implements Investigator {
}
CheckOnHostCommand cmd = new CheckOnHostCommand(agent);
List<HostVO> neighbors = _hostDao.listByHostPod(agent.getPodId());
List<HostVO> neighbors = _hostDao.listByCluster(agent.getClusterId());
for (HostVO neighbor : neighbors) {
if (neighbor.getId() == agent.getId() || neighbor.getHypervisorType() != HypervisorType.XenServer) {
continue;

View File

@ -1254,7 +1254,9 @@ public class StorageManagerImpl implements StorageManager {
}
List<HostVO> hosts = null;
if (podId != null) {
if (clusterId != null) {
hosts = _hostDao.listByCluster(clusterId);
} else if (podId != null) {
hosts = _hostDao.listByHostPod(podId);
} else {
hosts = _hostDao.listByDataCenter(zoneId);