mirror of https://github.com/apache/cloudstack.git
parent
ea569ffaad
commit
a11fc43788
|
|
@ -159,11 +159,11 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co
|
||||||
private String serviceOfferingName;
|
private String serviceOfferingName;
|
||||||
|
|
||||||
@SerializedName(ApiConstants.DISK_OFFERING_ID)
|
@SerializedName(ApiConstants.DISK_OFFERING_ID)
|
||||||
@Param(description = "the ID of the disk offering of the virtual machine", since = "4.4")
|
@Param(description = "the ID of the disk offering of the virtual machine. This parameter should not be used for retrieving disk offering details of DATA volumes. Use listVolumes API instead", since = "4.4")
|
||||||
private String diskOfferingId;
|
private String diskOfferingId;
|
||||||
|
|
||||||
@SerializedName("diskofferingname")
|
@SerializedName("diskofferingname")
|
||||||
@Param(description = "the name of the disk offering of the virtual machine", since = "4.4")
|
@Param(description = "the name of the disk offering of the virtual machine. This parameter should not be used for retrieving disk offering details of DATA volumes. Use listVolumes API instead", since = "4.4")
|
||||||
private String diskOfferingName;
|
private String diskOfferingName;
|
||||||
|
|
||||||
@SerializedName(ApiConstants.BACKUP_OFFERING_ID)
|
@SerializedName(ApiConstants.BACKUP_OFFERING_ID)
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import com.cloud.storage.Volume;
|
||||||
import org.apache.cloudstack.affinity.AffinityGroupResponse;
|
import org.apache.cloudstack.affinity.AffinityGroupResponse;
|
||||||
import org.apache.cloudstack.annotation.AnnotationService;
|
import org.apache.cloudstack.annotation.AnnotationService;
|
||||||
import org.apache.cloudstack.annotation.dao.AnnotationDao;
|
import org.apache.cloudstack.annotation.dao.AnnotationDao;
|
||||||
|
|
@ -42,6 +43,7 @@ import org.apache.cloudstack.context.CallContext;
|
||||||
import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
|
import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
|
||||||
import org.apache.cloudstack.query.QueryService;
|
import org.apache.cloudstack.query.QueryService;
|
||||||
import org.apache.commons.lang3.BooleanUtils;
|
import org.apache.commons.lang3.BooleanUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
|
@ -550,6 +552,11 @@ public class UserVmJoinDaoImpl extends GenericDaoBaseWithTagInformation<UserVmJo
|
||||||
userVmData.addAffinityGroup(resp);
|
userVmData.addAffinityGroup(resp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StringUtils.isEmpty(userVmData.getDiskOfferingId()) && !Volume.Type.ROOT.equals(uvo.getVolumeType())) {
|
||||||
|
userVmData.setDiskOfferingId(uvo.getDiskOfferingUuid());
|
||||||
|
userVmData.setDiskOfferingName(uvo.getDiskOfferingName());
|
||||||
|
}
|
||||||
|
|
||||||
return userVmData;
|
return userVmData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue