mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5299: set hypervisor_type of volumes from image format if not set.
This commit is contained in:
parent
ab39b658ad
commit
221aea5730
|
|
@ -171,8 +171,12 @@ public class VolumeJoinDaoImpl extends GenericDaoBase<VolumeJoinVO, Long> implem
|
|||
|
||||
// return hypervisor and storage pool info for ROOT and Resource domain only
|
||||
if (caller.getType() == Account.ACCOUNT_TYPE_ADMIN || caller.getType() == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN) {
|
||||
if (volume.getState() != Volume.State.UploadOp && volume.getHypervisorType() != null) {
|
||||
volResponse.setHypervisor(volume.getHypervisorType().toString());
|
||||
if (volume.getState() != Volume.State.UploadOp) {
|
||||
if (volume.getHypervisorType() != null) {
|
||||
volResponse.setHypervisor(volume.getHypervisorType().toString());
|
||||
} else {
|
||||
volResponse.setHypervisor(ApiDBUtils.getHypervisorTypeFromFormat(volume.getFormat()).toString());
|
||||
}
|
||||
}
|
||||
Long poolId = volume.getPoolId();
|
||||
String poolName = (poolId == null) ? "none" : volume.getPoolName();
|
||||
|
|
|
|||
Loading…
Reference in New Issue