mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-5299: set hypervisor_type of volumes from image format if not set.
(cherry picked from commit 221aea5730)
Conflicts:
server/src/com/cloud/api/query/dao/VolumeJoinDaoImpl.java
This commit is contained in:
parent
224c48a76e
commit
562aa0425b
|
|
@ -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