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 8c4c9e9c5d
commit 65bc9f95a8
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() != Hypervisor.Type.XenServer) {
continue;

View File

@ -1144,7 +1144,9 @@ public class StorageManagerImpl implements StorageManager {
Hypervisor.Type hypervisorType = null;
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);