Revert "CLOUDSTACK-6935 refactor StoragePoolAllocator#filter logic"

This reverts commit 31de58edab.
This commit is contained in:
ynojima 2014-06-18 13:04:39 -06:00
parent 6fcd4fbe7b
commit 77e74841a0
2 changed files with 9 additions and 1 deletions

View File

@ -183,6 +183,6 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement
Volume volume = _volumeDao.findById(dskCh.getVolumeId());
List<Volume> requestVolumes = new ArrayList<Volume>();
requestVolumes.add(volume);
return storageMgr.storagePoolHasEnoughIops(requestVolumes, pool) && storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
return storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
}
}

View File

@ -47,6 +47,14 @@ public class ZoneWideStoragePoolAllocator extends AbstractStoragePoolAllocator {
@Inject
DataStoreManager dataStoreMgr;
@Override
protected boolean filter(ExcludeList avoid, StoragePool pool, DiskProfile dskCh, DeploymentPlan plan) {
Volume volume = _volumeDao.findById(dskCh.getVolumeId());
List<Volume> requestVolumes = new ArrayList<Volume>();
requestVolumes.add(volume);
return storageMgr.storagePoolHasEnoughIops(requestVolumes, pool) && storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
}
@Override
protected List<StoragePool> select(DiskProfile dskCh, VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid, int returnUpTo) {