sureshanaparti commented on a change in pull request #4875:
URL: https://github.com/apache/cloudstack/pull/4875#discussion_r704048728



##########
File path: 
plugins/storage/image/swift/src/main/java/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
##########
@@ -100,12 +102,28 @@ public String createEntityExtractUrl(DataStore store, 
String installPath, ImageF
 
     @Override
     public void createAsync(DataStore dataStore, DataObject data, 
AsyncCompletionCallback<CreateCmdResult> callback) {
-        Long maxTemplateSizeInBytes = getMaxTemplateSizeInBytes();
-        VirtualMachineTemplate tmpl = _templateDao.findById(data.getId());
+
+        DownloadCommand downloadCommand = null;
+        if (data.getType() == DataObjectType.TEMPLATE) {
+            Long maxTemplateSizeInBytes = getMaxTemplateSizeInBytes();
+            downloadCommand = new DownloadCommand((TemplateObjectTO) 
(data.getTO()), maxTemplateSizeInBytes);
+        }else if (data.getType() == DataObjectType.VOLUME){

Review comment:
       ```suggestion
           } else if (data.getType() == DataObjectType.VOLUME) {
   ```




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to