mirror of https://github.com/apache/cloudstack.git
vmware: Fix bad ovf null error when registering template (#3511)
Fix template registration regression.
This commit is contained in:
parent
6a511fce40
commit
2050a90ee8
|
|
@ -148,8 +148,14 @@ public class OVFHelper {
|
|||
throw new CloudRuntimeException("The ovf file info has incomplete disk info");
|
||||
}
|
||||
Long capacity = cdisk == null ? of._size : cdisk._capacity;
|
||||
String controller = cdisk == null ? "" : cdisk._controller._name;
|
||||
String controllerSubType = cdisk == null ? "" : cdisk._controller._subType;
|
||||
String controller = "";
|
||||
String controllerSubType = "";
|
||||
if (cdisk != null) {
|
||||
OVFDiskController cDiskController = cdisk._controller;
|
||||
controller = cDiskController == null ? "" : cdisk._controller._name;
|
||||
controllerSubType = cDiskController == null ? "" : cdisk._controller._subType;
|
||||
}
|
||||
|
||||
String dataDiskPath = ovfFile.getParent() + File.separator + of._href;
|
||||
File f = new File(dataDiskPath);
|
||||
if (!f.exists() || f.isDirectory()) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue