harikrishna-patnala commented on a change in pull request #5008:
URL: https://github.com/apache/cloudstack/pull/5008#discussion_r755732354
##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -2086,6 +2006,38 @@ private boolean upgradeRunningVirtualMachine(Long vmId,
Long newServiceOfferingI
return success;
}
+ private void changeDiskOfferingForRootVolume(Long vmId, DiskOfferingVO
newDiskOffering, Map<String, String> customParameters) throws
ResourceAllocationException {
+
+ List<VolumeVO> vols =
_volsDao.findReadyAndAllocatedRootVolumesByInstance(vmId);
+
+ for (final VolumeVO rootVolumeOfVm : vols) {
+ DiskOfferingVO currentRootDiskOffering =
_diskOfferingDao.findById(rootVolumeOfVm.getDiskOfferingId());
+ HypervisorType hypervisorType =
_volsDao.getHypervisorType(rootVolumeOfVm.getId());
+ if (HypervisorType.Simulator != hypervisorType) {
+ Long minIopsInNewDiskOffering = null;
+ Long maxIopsInNewDiskOffering = null;
+ boolean autoMigrate = false;
+ if (customParameters.containsKey(ApiConstants.MIN_IOPS)) {
Review comment:
ScaleVM API has separate parameters (not from details/custom params) to
pass min and max iops values. Internally in service layer during passing
between methods these are added to custom parameters and used here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]