mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Updated storage type of the volume, in the volume response, based on the underlying storage pool. (#5560)
This commit is contained in:
parent
45967cffb2
commit
07efd7c19d
@ -213,10 +213,13 @@ public class VolumeJoinDaoImpl extends GenericDaoBaseWithTagInformation<VolumeJo
|
||||
volResponse.setStoragePoolId(volume.getPoolUuid());
|
||||
if (poolId != null) {
|
||||
StoragePoolVO poolVO = primaryDataStoreDao.findById(poolId);
|
||||
if (poolVO != null && poolVO.getParent() != 0L) {
|
||||
StoragePoolVO datastoreClusterVO = primaryDataStoreDao.findById(poolVO.getParent());
|
||||
volResponse.setStoragePoolName(datastoreClusterVO.getName());
|
||||
volResponse.setStoragePoolId(datastoreClusterVO.getUuid());
|
||||
if (poolVO != null) {
|
||||
volResponse.setStorageType(poolVO.isLocal() ? ServiceOffering.StorageType.local.toString() : ServiceOffering.StorageType.shared.toString());
|
||||
if (poolVO.getParent() != 0L) {
|
||||
StoragePoolVO datastoreClusterVO = primaryDataStoreDao.findById(poolVO.getParent());
|
||||
volResponse.setStoragePoolName(datastoreClusterVO.getName());
|
||||
volResponse.setStoragePoolId(datastoreClusterVO.getUuid());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user