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 2021/09/08 05:01:39 UTC
[GitHub] [cloudstack] sureshanaparti commented on a change in pull request #4875: Fix data volume import / export functionality when using swift as secondary storage
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: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org