cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raj...@apache.org
Subject git commit: updated refs/heads/volume-upload to 878b43b
Date Mon, 30 Mar 2015 12:27:37 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/volume-upload eac8d4b15 -> 878b43bc6


volume-upload: removed hardcoded vhd for Image format check.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/878b43bc
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/878b43bc
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/878b43bc

Branch: refs/heads/volume-upload
Commit: 878b43bc64bf3070babc4a62f4c5c74f9cbb0b38
Parents: eac8d4b
Author: Rajani Karuturi <rajanikaruturi@gmail.com>
Authored: Mon Mar 30 17:52:43 2015 +0530
Committer: Rajani Karuturi <rajanikaruturi@gmail.com>
Committed: Mon Mar 30 17:56:59 2015 +0530

----------------------------------------------------------------------
 .../cloudstack/storage/resource/NfsSecondaryStorageResource.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/878b43bc/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
----------------------------------------------------------------------
diff --git a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
index 8ccbcb6..1571f50 100755
--- a/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
+++ b/services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
@@ -2666,13 +2666,13 @@ public class NfsSecondaryStorageResource extends ServerResourceBase
implements S
         String fileSavedTempLocation = uploadEntity.getInstallPathPrefix() + "/" + filename;
 
         String uploadedFileExtension = FilenameUtils.getExtension(filename);
-        String userSelectedFormat= "vhd";
+        String userSelectedFormat= uploadEntity.getFormat().toString();
         if(uploadedFileExtension.equals("zip") || uploadedFileExtension.equals("bz2") ||
uploadedFileExtension.equals("gz")) {
             userSelectedFormat += "." + uploadedFileExtension;
         }
         String formatError = ImageStoreUtil.checkTemplateFormat(fileSavedTempLocation, userSelectedFormat);
         if(StringUtils.isNotBlank(formatError)) {
-            String errorString = "File type mismatch between uploaded file and selected format.
Selected file format: " + uploadEntity.getFormat() + ". Received: " + formatError;
+            String errorString = "File type mismatch between uploaded file and selected format.
Selected file format: " + userSelectedFormat + ". Received: " + formatError;
             s_logger.error(errorString);
             return errorString;
         }


Mime
View raw message