DaanHoogland commented on a change in pull request #3154: Copy template to 
target KVM host if needed when migrating local <> local storage
URL: https://github.com/apache/cloudstack/pull/3154#discussion_r251757894
 
 

 ##########
 File path: 
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java
 ##########
 @@ -1859,14 +1861,21 @@ protected void setVolumePath(VolumeVO volume) {
         volume.setPath(volume.get_iScsiName());
     }
 
+    /**
+     * For this strategy it is not necessary to check and migrate the 
template; however, classes that extend this one may need to check if the 
template is on the target storage pool (and if not then migrate) before 
migrating the VM.
+     */
+    protected void migrateTemplateToTargetFilesystemStorageIfNeeded(VolumeInfo 
srcVolumeInfo, DataStore destDataStore, StoragePool destStoragePool, Host 
destHost) {
+        // This method is used by classes that extend this one
 
 Review comment:
   I am wary of this pattern. Can you explain why you implemented it this way? 
It seems you are implementing a pattern for genericity while already knowing it 
is only applicable for localstorage.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to