CLOUDSTACK-4433:[VMware]Registration of template using the downloaded

template URL is failing.
(cherry picked from commit 885a161b62)

Signed-off-by: animesh <animesh@apache.org>
This commit is contained in:
Min Chen 2013-08-21 17:32:51 -07:00 committed by animesh
parent bd5f6e039a
commit 71bd669cb0
2 changed files with 491 additions and 474 deletions

View File

@ -27,7 +27,6 @@ import java.util.List;
import java.util.Map;
import java.util.UUID;
import com.cloud.utils.exception.ExceptionUtil;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
@ -904,7 +903,7 @@ public class VmwareStorageProcessor implements StorageProcessor {
long virtualSize = processor.getTemplateVirtualSize(installFullPath, templateUniqueName);
postCreatePrivateTemplate(installFullPath, templateId, templateUniqueName, physicalSize, virtualSize);
writeMetaOvaForTemplate(installFullPath, backupSSUuid + File.separator + backupSSUuid + ".ovf", templateVMDKName, templateUniqueName, physicalSize);
writeMetaOvaForTemplate(installFullPath, backupSSUuid + ".ovf", templateVMDKName, templateUniqueName, physicalSize);
return new Ternary<String, Long, Long>(installPath + "/" + templateUniqueName + ".ova", physicalSize, virtualSize);
} finally {
// TODO, clean up left over files
@ -1509,9 +1508,9 @@ public class VmwareStorageProcessor implements StorageProcessor {
+ backupName.replace(".ova", ".ovf");
} else {
srcOVAFileName = secondaryMountPoint + "/" + secStorageDir + "/"
+ backupName + "." + ImageFormat.OVA.getFileExtension();
+ backupName + "." + ImageFormat.OVA.getFileExtension();
srcOVFFileName = secondaryMountPoint + "/" + secStorageDir + "/"
+ backupName + ".ovf";
+ backupName + ".ovf";
}
String snapshotDir = "";
if (backupName.contains("/")){