CLOUDSTACK-6579: used_bytes column of storage_pool table is no longer used and should be removed

For now correctly setting used_bytes. Also fixed the corresponding simulator code
This commit is contained in:
Koushik Das 2014-05-06 20:24:08 +05:30
parent 59bf355919
commit c9a09f548c
2 changed files with 3 additions and 3 deletions

View File

@ -81,7 +81,7 @@ public class DefaultHostListener implements HypervisorHostListener {
}
StoragePoolVO poolVO = this.primaryStoreDao.findById(poolId);
poolVO.setUsedBytes(mspAnswer.getPoolInfo().getAvailableBytes());
poolVO.setUsedBytes(mspAnswer.getPoolInfo().getCapacityBytes() - mspAnswer.getPoolInfo().getAvailableBytes());
poolVO.setCapacityBytes(mspAnswer.getPoolInfo().getCapacityBytes());
primaryStoreDao.update(pool.getId(), poolVO);

View File

@ -362,7 +362,7 @@ public class MockStorageManagerImpl extends ManagerBase implements MockStorageMa
txn = TransactionLegacy.open(TransactionLegacy.CLOUD_DB);
txn.close();
}
return new ModifyStoragePoolAnswer(cmd, storagePool.getCapacity(), 0, new HashMap<String, TemplateProp>());
return new ModifyStoragePoolAnswer(cmd, storagePool.getCapacity(), storagePool.getCapacity(), new HashMap<String, TemplateProp>());
}
@Override
@ -964,7 +964,7 @@ public class MockStorageManagerImpl extends ManagerBase implements MockStorageMa
}
}
return new StoragePoolInfo(storagePool.getUuid(), host.getPrivateIpAddress(), storagePool.getMountPoint(), storagePool.getMountPoint(),
storagePool.getPoolType(), storagePool.getCapacity(), 0);
storagePool.getPoolType(), storagePool.getCapacity(), storagePool.getCapacity());
}
@Override