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 2018/03/19 10:39:40 UTC

[GitHub] rafaelweingartner commented on a change in pull request #2486: [CLOUDSTACK-10323] Allow changing disk offering during volume migration

rafaelweingartner commented on a change in pull request #2486: [CLOUDSTACK-10323] Allow changing disk offering during volume migration 
URL: https://github.com/apache/cloudstack/pull/2486#discussion_r175390104
 
 

 ##########
 File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
 ##########
 @@ -2097,26 +2079,102 @@ public Volume migrateVolume(MigrateVolumeCmd cmd) {
             }
         }
 
-        return orchestrateMigrateVolume(vol.getId(), destPool.getId(), liveMigrateVolume);
+        return orchestrateMigrateVolume(vol, destPool, liveMigrateVolume, newDiskOffering);
     }
 
-    private Volume orchestrateMigrateVolume(long volumeId, long destPoolId, boolean liveMigrateVolume) {
-        VolumeVO vol = _volsDao.findById(volumeId);
-        assert (vol != null);
-        StoragePool destPool = (StoragePool)dataStoreMgr.getDataStore(destPoolId, DataStoreRole.Primary);
-        assert (destPool != null);
+    /**
+     * Retrieve the new disk offering UUID that might be sent to replace the current one in the volume being migrated.
+     * If no disk offering UUID is provided we return null. Otherwise, we perform the following checks.
+     * <ul>
 
 Review comment:
   It is not by mistake. It is on purpose to format the java documentation. Using them you are able to create javadocs as this one:
   ![javadoc](https://user-images.githubusercontent.com/4129005/37590952-a3137f44-2b48-11e8-9408-a32906dc0732.png)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services