mike-tutkowski commented on issue #2298: CLOUDSTACK-9620: Enhancements for 
managed storage
URL: https://github.com/apache/cloudstack/pull/2298#issuecomment-355676645
 
 
   @rafaelweingartner Sorry, I've probably been staring at code "too long" this 
afternoon and missed what you were saying at first. You probably mean something 
like this:
   
       private void handleCopyAsyncForSnapshotToVolume(SnapshotInfo 
srcSnapshotInfo, VolumeInfo destVolumeInfo,
                                                       
AsyncCompletionCallback<CopyCommandResult> callback) {
           boolean canHandleDest = canHandle(destVolumeInfo);
   
           if (!canHandleDest) {
               handleError(OPERATION_NOT_SUPPORTED, callback);
           }
   
           boolean canHandleSrc = canHandle(srcSnapshotInfo);
   
           if (canHandleSrc) {
               if (srcSnapshotInfo.getDataStore().getId() == 
destVolumeInfo.getDataStore().getId()) {
                   
handleCreateVolumeFromSnapshotBothOnStorageSystem(srcSnapshotInfo, 
destVolumeInfo, callback);
               } else {
                   String errMsg = "To perform this operation, the source and 
destination primary storages must be the same.";
   
                   handleError(errMsg, callback);
               }
           } else {
               
handleCreateVolumeFromSnapshotOnSecondaryStorage(srcSnapshotInfo, 
destVolumeInfo, callback);
           }
       }

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