Bug 13564: Incorrect format was coming for kvm since there was a ohardcoding on the extension to be of size 3 Instead take the format from the ENUM.

Reviewed-By: Kishan
This commit is contained in:
Nitin Mehta 2012-02-09 20:14:13 +05:30
parent 25053c41c8
commit 045dc02845
1 changed files with 1 additions and 1 deletions

View File

@ -217,7 +217,7 @@ public class UploadMonitorImpl implements UploadMonitor {
try{
// Create Symlink at ssvm
String path = vmTemplateHost.getInstallPath();
String uuid = UUID.randomUUID().toString() + path.substring(path.length() - 4) ; // last 4 characters of the path specify the format like .vhd
String uuid = UUID.randomUUID().toString() + "." + template.getFormat().getFileExtension(); // adding "." + vhd/ova... etc.
CreateEntityDownloadURLCommand cmd = new CreateEntityDownloadURLCommand(secStorage.getParent(), path, uuid);
long result = send(ssvm.getId(), cmd, null);
if (result == -1){