GabrielBrascher 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_r251802867
 
 

 ##########
 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:
   @DaanHoogland The class KvmNonManagedStorageDataMotionStrategy was 
implemented extending the StorageSystemDataMotionStrategy and adding methods 
such as this one in the superclass execution flow. This was the best that I 
could think regarding using the current architecture and easying future 
maintenance and extensions. Ideally, we should refactor this class structure 
and use proper O.O. However, that was not a simple task, and as such I think it 
is best executed separated from any new feature introduction.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to