Github user alexandrelimassantana commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1410#discussion_r52846110 --- Diff: engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java --- @@ -207,10 +211,14 @@ public VolumeInfo moveVolume(VolumeInfo volume, long destPoolDcId, Long destPool // Find a destination storage pool with the specified criteria DiskOffering diskOffering = _entityMgr.findById(DiskOffering.class, volume.getDiskOfferingId()); - ; DiskProfile dskCh = new DiskProfile(volume.getId(), volume.getVolumeType(), volume.getName(), diskOffering.getId(), diskOffering.getDiskSize(), diskOffering.getTagsArray(), diskOffering.getUseLocalStorage(), diskOffering.isRecreatable(), null); dskCh.setHyperType(dataDiskHyperType); + dskCh.setBytesReadRate(storageMgr.getDiskBytesReadRate(null, diskOffering)); --- End diff -- Hello @ustcweizhou, I see you have added into multiple methods the lines 217-220, where the only slight change is the first parameter being null or an ServiceOffering instance. I think that in order to avoid repeating the same code, you could extract those lines into the DiskProfile class. That way you can document and test the method and enhance reusability.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---