/** * This method looks for all storage pools that are compatible with the given volume. * <ul> * <li>We will look for storage systems that are zone wide.</li> * <li>We also all storage available filtering by data center, pod and cluster as the current storage pool used by the given volume.</li> * </ul> */ private List<? extends StoragePool> getAllStoragePoolCompatileWithVolumeSourceStoragePool(StoragePool srcVolumePool) { List<StoragePoolVO> storagePools = new ArrayList<>(); List<StoragePoolVO> zoneWideStoragePools = _poolDao.findZoneWideStoragePoolsByTags(srcVolumePool.getDataCenterId(), null); if (CollectionUtils.isNotEmpty(zoneWideStoragePools)) { storagePools.addAll(zoneWideStoragePools); } List<StoragePoolVO> clusterAndLocalStoragePools = _poolDao.listBy(srcVolumePool.getDataCenterId(), srcVolumePool.getPodId(), srcVolumePool.getClusterId(), null); if (CollectionUtils.isNotEmpty(clusterAndLocalStoragePools)) { storagePools.addAll(clusterAndLocalStoragePools); } return storagePools; }
List<StoragePoolVO> pools = storagePoolDao.listBy(dcId, podId, clusterId, ScopeType.CLUSTER); if (pools.size() == 0) { if (s_logger.isDebugEnabled()) {
scCmd.getHypervisorType() == HypervisorType.Ovm || scCmd.getHypervisorType() == HypervisorType.Hyperv || scCmd.getHypervisorType() == HypervisorType.LXC || scCmd.getHypervisorType() == HypervisorType.Ovm3) { List<StoragePoolVO> pools = _poolDao.listBy(host.getDataCenterId(), host.getPodId(), host.getClusterId(), ScopeType.CLUSTER); List<StoragePoolVO> zoneStoragePoolsByTags = _poolDao.findZoneWideStoragePoolsByTags(host.getDataCenterId(), null); List<StoragePoolVO> zoneStoragePoolsByHypervisor = _poolDao.findZoneWideStoragePoolsByHypervisor(host.getDataCenterId(), scCmd.getHypervisorType());