You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/09/01 09:42:12 UTC

[GitHub] [cloudstack] harikrishna-patnala commented on a change in pull request #5008: Decouple service (compute) offering and disk offering

harikrishna-patnala commented on a change in pull request #5008:
URL: https://github.com/apache/cloudstack/pull/5008#discussion_r699152278



##########
File path: server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
##########
@@ -1448,10 +1452,15 @@ public int compare(Volume v1, Volume v2) {
                                 else
                                     requestVolumes = new ArrayList<Volume>();
                                 requestVolumes.add(vol);
-
+                                List<Pair<Volume, DiskProfile>> volumeDiskProfilePair = new ArrayList<>();
+                                for (Volume volume: requestVolumes) {
+                                    DiskOfferingVO diskOffering = _diskOfferingDao.findById(volume.getDiskOfferingId());
+                                    DiskProfile diskProfile = new DiskProfile(volume, diskOffering, _volsDao.getHypervisorType(volume.getId()));
+                                    volumeDiskProfilePair.add(new Pair<>(volume, diskProfile));

Review comment:
       moved to a new method getVolumeDiskProfilePairs()




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org