AlertManager should check primary storage stats as well

This commit is contained in:
nit 2011-03-14 21:27:26 -07:00
parent f88fb1e505
commit a83c4256f1
1 changed files with 7 additions and 1 deletions

View File

@ -333,7 +333,13 @@ public class AlertManagerImpl implements AlertManager {
try {
List<CapacityVO> capacityList = _capacityDao.listAllIncludingRemoved();
Map<String, List<CapacityVO>> capacityDcTypeMap = new HashMap<String, List<CapacityVO>>();
_storageMgr.getStoragePoolUsedStats(null, null, null);
List<CapacityVO> storagePoolStatsList = _storageMgr.getStoragePoolUsedStats(null, null, null);
if (capacityList == null){
capacityList = storagePoolStatsList;
}else {
capacityList.addAll(storagePoolStatsList);
}
for (CapacityVO capacity : capacityList) {
long dataCenterId = capacity.getDataCenterId();